Update test workflow #96
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: test | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| - 'v*' | |
| env: | |
| DOCKER_BUILD_CHECKS_ANNOTATIONS: "false" | |
| DOCKER_BUILD_SUMMARY: "false" | |
| DOCKER_BUILD_RECORD_UPLOAD: "false" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: docker/setup-buildx-action@v3 | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: dockerbakery/github-metadata-action | |
| - name: Run dockerbakery/github-metadata-action@${{ github.ref_name }} | |
| id: github-meta | |
| uses: ./ | |
| - name: Action output | |
| run: echo "${{ steps.github-meta.outputs.bake-file }}" | |
| - name: Action env | |
| run: | | |
| env | grep GITHUB_ | |
| env | grep RUNNER_ | |
| - name: Action bake file | |
| run: | | |
| docker buildx bake -f "${{ steps.github-meta.outputs.bake-file }}" --print github-metadata-action | |
| - name: Build with local context | |
| uses: docker/bake-action@v6 | |
| with: | |
| workdir: ./example | |
| source: . | |
| files: | | |
| ./docker-bake.hcl | |
| ${{ steps.meta.outputs.bake-file }} | |
| ${{ steps.github-meta.outputs.bake-file }} | |
| no-cache: true | |
| - name: Build with remote context (default) | |
| uses: docker/bake-action@v6 | |
| with: | |
| source: "{{defaultContext}}:example" | |
| files: | | |
| ./docker-bake.hcl | |
| cwd://${{ steps.meta.outputs.bake-file }} | |
| cwd://${{ steps.github-meta.outputs.bake-file }} | |
| no-cache: true |