arm support #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: push | ||
on: push | ||
permissions: | ||
contents: read | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.20" | ||
- run: go test -v -cover $(go list ./... | grep -v /vendor) | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.20" | ||
- run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X main.SHA=${{ github.sha }}" -o bin/vaultcreds cmd/*.go | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: bin | ||
path: bin/ | ||
docker-build-push: | ||
if: github.ref_name == 'master' || startsWith(github.ref, 'refs/tags/v') | ||
needs: [test, build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Docker buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Quay.io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_USERNAME }} | ||
password: ${{ secrets.QUAY_PASSWORD }} | ||
- id: meta | ||
if: github.repository == 'uswitch/vault-creds' | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: quay.io/uswitch/vault-creds | ||
tags: | | ||
type=semver,pattern=v{{version}} | ||
type=sha,prefix=,format=long, | ||
- id: meta (forks) | ||
Check failure on line 52 in .github/workflows/push.yaml GitHub Actions / pushInvalid workflow file
|
||
if: github.repository != 'uswitch/vault-creds' | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ghcr.io/${{ github.repository }} | ||
tags: | | ||
type=semver,pattern=v{{version}} | ||
type=sha,prefix=,format=long, | ||
- uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
labels: ${{ steps.meta.outputs.labels }} | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||