CI #805
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 | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| merge_group: {} | |
| workflow_dispatch: | |
| permissions: {} | |
| jobs: | |
| build: | |
| name: Test, lint, build and push (if on main) | |
| runs-on: ubuntu-latest | |
| env: | |
| IMAGE: ghcr.io/${{ github.repository }}:latest | |
| GITHUB_TOKEN: ${{ secrets.ACTIONS_BOT_TOKEN }} | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 # needed for finding the current version | |
| - uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: ./go.mod | |
| - uses: arduino/setup-task@v2 | |
| with: | |
| version: 3.x | |
| - name: Check for uncommitted changes | |
| run: task check-diff | |
| - run: task test | |
| - run: task lint | |
| - run: task build | |
| - name: Log in and push image to Container Registry | |
| if: github.event_name == 'push' | |
| run: | | |
| echo ${{ github.token }} | buildah login --username ${{ github.repository_owner }} --password-stdin ghcr.io | |
| buildah manifest push --all ${IMAGE} |