chore: Update step names #2
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: Docker | ||
|
Check failure on line 1 in .github/workflows/docker-build-push.yml
|
||
| on: | ||
| push: | ||
| branches: [main, dev] | ||
| tags: ['*'] | ||
| pull_request: | ||
| branches: [main, dev] | ||
| workflow_dispatch: | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out the repo | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| fetch-tags: true | ||
| fetch-depth: 200 | ||
| filter: blob:none | ||
| - name: Log in to Docker Hub | ||
| if: github.event_name == 'push' | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ secrets.DOCKER_USERNAME }} | ||
| password: ${{ secrets.DOCKER_PASSWORD }} | ||
| - name: Extract metadata (tags, labels) for Docker | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: bids/validator | ||
| - name: Build ${{ 'and push' * startsWith(github.ref, 'refs/tags/') }} ${{ steps.meta.outputs.tags }} | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| context: . | ||
| push: ${{ startsWith(github.ref, 'refs/tags/') }} | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| - name: Verify Docker image | ||
| run: docker run --rm ${{ steps.meta.outputs.tags }} --version | ||