Skip to content

Commit

Permalink
ci: add snapshot builds using gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
theSuess committed Nov 19, 2023
1 parent 25bbb32 commit 5ec417c
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 28 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: goreleaser

on:
push:
branches:
- custom/ffmpeg-build

permissions:
contents: read
packages: write

jobs:
publish-snapshot:
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
with:
go-version: '>=1.21.0'
- name: Install go-swagger
uses: jaxxstorm/[email protected]
with:
repo: go-swagger/go-swagger
extension-matching: disable
rename-to: swagger
chmod: 0755
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean --snapshot
- 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
56 changes: 28 additions & 28 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ builds:
- -w
- -extldflags
- -static
- -X main.Version={{.Version}}
- -X main.Version={{.Version}}-pkv
tags:
- netgo
- osusergo
Expand Down Expand Up @@ -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}}"
Expand All @@ -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}}"
Expand All @@ -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}}"
Expand All @@ -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}}"
Expand All @@ -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/
-
Expand Down

0 comments on commit 5ec417c

Please sign in to comment.