fix automatic env for viper #12
Workflow file for this run
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: | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| build-and-publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Nix | |
| uses: DeterminateSystems/nix-installer-action@v16 | |
| - name: Run unit tests | |
| run: nix develop --command go test -v -coverprofile=coverage.txt ./... | |
| - name: Build binary | |
| run: nix develop --command go build . | |
| - name: Log in to GHCR | |
| if: github.ref == 'refs/heads/main' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Docker metadata | |
| id: meta | |
| uses: docker/[email protected] | |
| with: | |
| images: ghcr.io/kdwils/envoy-gateway-bouncer | |
| tags: | | |
| type=sha,format=long | |
| type=ref,event=tag | |
| - name: Set up QEMU | |
| uses: docker/[email protected] | |
| - name: Set up Docker Buildx | |
| uses: docker/[email protected] | |
| - name: Build and publish Docker image | |
| id: build-and-publish | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| push: ${{ github.ref == 'refs/heads/main' }} | |
| platforms: linux/amd64,linux/arm64 | |
| labels: ${{ steps.meta.outputs.labels }} | |
| tags: ${{ steps.meta.outputs.tags }} |