Skip to content

Fix pipeline file

Fix pipeline file #289

Workflow file for this run

name: Docker Image CI
on:
push:
branches:
- "*"
tags:
- "v*"
env:
IMAGE_NAME: steeven9/fenice2
jobs:
build-tags:
# Build and push the image with the tag name
uses: steeven9/CICD-template/.github/workflows/docker-build.yml@main
if: github.ref_type == 'tag'
with:
image-name: ${{ jobs.build-tags.env.IMAGE_NAME }}:${{ github.ref_name }}

Check failure on line 19 in .github/workflows/docker-image.yml

View workflow run for this annotation

GitHub Actions / Docker Image CI

Invalid workflow file

The workflow is not valid. .github/workflows/docker-image.yml (Line: 19, Col: 19): Unrecognized named-value: 'jobs'. Located at position 1 within expression: jobs.build-tags.env.IMAGE_NAME .github/workflows/docker-image.yml (Line: 30, Col: 19): Unrecognized named-value: 'jobs'. Located at position 1 within expression: jobs.build-branches.env.IMAGE_NAME
push: true
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
build-branches:
# Build all branches but push only in main
uses: steeven9/CICD-template/.github/workflows/docker-build.yml@main
if: github.ref_type == 'branch'
with:
image-name: ${{ jobs.build-branches.env.IMAGE_NAME }}:latest
push: ${{ github.ref_name == 'main' }}
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}