Pin dependencies #6
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
| # Build the Docker image to make sure it works | |
| name: docker-build-test | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| # See `.dockerignore` for more details. | |
| - ".github/workflows/docker-build-test.yaml" # Include workflow itself | |
| - ".dockerignore" | |
| - "Dockerfile" | |
| - "go.mod" | |
| - "go.sum" | |
| - "cmd/**" | |
| - "data/**" | |
| - "internal/**" | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3 | |
| - name: build Docker image | |
| uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6 | |
| with: | |
| context: . | |
| push: false | |
| load: true | |
| tags: test-${{ github.sha }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: test Docker image | |
| run: | | |
| docker image ls | |
| docker run --rm test-${{ github.sha }} --version || true | |
| echo "✅ Docker image built successfully!" |