Merge pull request #12 from uswitch/airship-4279/upgrade #5
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| tags: | |
| - '*' | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25.5' | |
| - name: Build binary | |
| run: | | |
| GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o bin/surtr | |
| - name: Log in to Quay.io | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: quay.io | |
| username: ${{ secrets.QUAY_USERNAME }} | |
| password: ${{ secrets.QUAY_PASSWORD }} | |
| - name: Extract metadata for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: quay.io/uswitch/surtr | |
| tags: | | |
| type=semver,pattern={{raw}} | |
| type=sha,prefix=,format=long | |
| - name: Push to Quay.io | |
| id: docker-push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| labels: ${{ steps.meta.outputs.labels }} | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} |