diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..98a33e52f7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,41 @@ +name: goreleaser + +on: + push: + branches: + - custom/ffmpeg-build + +permissions: + contents: read + packages: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up Go + uses: actions/setup-go@v4 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + with: + distribution: goreleaser + version: snapshot + args: release --rm-dist + - name: Push container images + run: | + docker push ghcr.io/parkour-vienna/gotosocial:snapshot-armv6 + docker push ghcr.io/parkour-vienna/gotosocial:snapshot-armv7 + docker push ghcr.io/parkour-vienna/gotosocial:snapshot-arm64v8 + docker push ghcr.io/parkour-vienna/gotosocial:snapshot-amd64 + docker manifest create ghcr.io/parkour-vienna/gotosocial:snapshot ghcr.io/parkour-vienna/gotosocial:snapshot-armv6 ghcr.io/parkour-vienna/gotosocial:snapshot-armv7 ghcr.io/parkour-vienna/gotosocial:snapshot-amd64 ghcr.io/parkour-vienna/gotosocial:snapshot-arm64v8 + docker manifest push ghcr.io/parkour-vienna/gotosocial:snapshot diff --git a/.goreleaser.yml b/.goreleaser.yml index a49bb32e8a..e67f1a949b 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -20,7 +20,7 @@ builds: - -w - -extldflags - -static - - -X main.Version={{.Version}} + - -X main.Version={{.Version}}-pkv tags: - netgo - osusergo @@ -56,9 +56,9 @@ dockers: goos: linux goarch: amd64 image_templates: - - "superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-amd64" - - "superseriousbusiness/{{ .ProjectName }}:latest-amd64" - - "superseriousbusiness/{{ .ProjectName }}:snapshot-amd64" + - "ghcr.io/parkour-vienna/{{ .ProjectName }}:{{ .Version }}-amd64" + - "ghcr.io/parkour-vienna/{{ .ProjectName }}:latest-amd64" + - "ghcr.io/parkour-vienna/{{ .ProjectName }}:snapshot-amd64" build_flag_templates: - "--platform=linux/amd64" - "--label=org.opencontainers.image.created={{.Date}}" @@ -76,9 +76,9 @@ dockers: goos: linux goarch: arm64 image_templates: - - "superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-arm64v8" - - "superseriousbusiness/{{ .ProjectName }}:latest-arm64v8" - - "superseriousbusiness/{{ .ProjectName }}:snapshot-arm64v8" + - "ghcr.io/parkour-vienna/{{ .ProjectName }}:{{ .Version }}-arm64v8" + - "ghcr.io/parkour-vienna/{{ .ProjectName }}:latest-arm64v8" + - "ghcr.io/parkour-vienna/{{ .ProjectName }}:snapshot-arm64v8" build_flag_templates: - "--platform=linux/arm64/v8" - "--label=org.opencontainers.image.created={{.Date}}" @@ -97,9 +97,9 @@ dockers: goarch: arm goarm: 6 image_templates: - - "superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-armv6" - - "superseriousbusiness/{{ .ProjectName }}:latest-armv6" - - "superseriousbusiness/{{ .ProjectName }}:snapshot-armv6" + - "ghcr.io/parkour-vienna/{{ .ProjectName }}:{{ .Version }}-armv6" + - "ghcr.io/parkour-vienna/{{ .ProjectName }}:latest-armv6" + - "ghcr.io/parkour-vienna/{{ .ProjectName }}:snapshot-armv6" build_flag_templates: - "--platform=linux/arm/v6" - "--label=org.opencontainers.image.created={{.Date}}" @@ -118,9 +118,9 @@ dockers: goarch: arm goarm: 7 image_templates: - - "superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-armv7" - - "superseriousbusiness/{{ .ProjectName }}:latest-armv7" - - "superseriousbusiness/{{ .ProjectName }}:snapshot-armv7" + - "ghcr.io/parkour-vienna/{{ .ProjectName }}:{{ .Version }}-armv7" + - "ghcr.io/parkour-vienna/{{ .ProjectName }}:latest-armv7" + - "ghcr.io/parkour-vienna/{{ .ProjectName }}:snapshot-armv7" build_flag_templates: - "--platform=linux/arm/v7" - "--label=org.opencontainers.image.created={{.Date}}" @@ -134,24 +134,24 @@ dockers: - cmd - internal docker_manifests: - - name_template: superseriousbusiness/{{ .ProjectName }}:{{ .Version }} + - name_template: ghcr.io/parkour-vienna/{{ .ProjectName }}:{{ .Version }} image_templates: - - superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-amd64 - - superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-arm64v8 - - superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-armv6 - - superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-armv7 - - name_template: superseriousbusiness/{{ .ProjectName }}:latest + - ghcr.io/parkour-vienna/{{ .ProjectName }}:{{ .Version }}-amd64 + - ghcr.io/parkour-vienna/{{ .ProjectName }}:{{ .Version }}-arm64v8 + - ghcr.io/parkour-vienna/{{ .ProjectName }}:{{ .Version }}-armv6 + - ghcr.io/parkour-vienna/{{ .ProjectName }}:{{ .Version }}-armv7 + - name_template: ghcr.io/parkour-vienna/{{ .ProjectName }}:latest image_templates: - - superseriousbusiness/{{ .ProjectName }}:latest-amd64 - - superseriousbusiness/{{ .ProjectName }}:latest-arm64v8 - - superseriousbusiness/{{ .ProjectName }}:latest-armv6 - - superseriousbusiness/{{ .ProjectName }}:latest-armv7 - - name_template: superseriousbusiness/{{ .ProjectName }}:snapshot + - ghcr.io/parkour-vienna/{{ .ProjectName }}:latest-amd64 + - ghcr.io/parkour-vienna/{{ .ProjectName }}:latest-arm64v8 + - ghcr.io/parkour-vienna/{{ .ProjectName }}:latest-armv6 + - ghcr.io/parkour-vienna/{{ .ProjectName }}:latest-armv7 + - name_template: ghcr.io/parkour-vienna/{{ .ProjectName }}:snapshot image_templates: - - superseriousbusiness/{{ .ProjectName }}:snapshot-amd64 - - superseriousbusiness/{{ .ProjectName }}:snapshot-arm64v8 - - superseriousbusiness/{{ .ProjectName }}:snapshot-armv6 - - superseriousbusiness/{{ .ProjectName }}:snapshot-armv7 + - ghcr.io/parkour-vienna/{{ .ProjectName }}:snapshot-amd64 + - ghcr.io/parkour-vienna/{{ .ProjectName }}:snapshot-arm64v8 + - ghcr.io/parkour-vienna/{{ .ProjectName }}:snapshot-armv6 + - ghcr.io/parkour-vienna/{{ .ProjectName }}:snapshot-armv7 archives: # https://goreleaser.com/customization/archive/ -