Skip to content

chore: Update step names #1

chore: Update step names

chore: Update step names #1

name: Docker

Check failure on line 1 in .github/workflows/docker-build-push.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/docker-build-push.yml

Invalid workflow file

(Line: 43, Col: 15): Unexpected symbol: '"and'. Located at position 1 within expression: "and push" * startsWith(github.ref, 'refs/tags/')
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