Skip to content

Update publish.yml

Update publish.yml #7

Workflow file for this run

name: Publish Container
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
jobs:
build:
name: Build container image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Verify that tag exists in origin/master
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/master
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- name: Log into docker hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_ACCOUNT }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build container
uses: docker/[email protected]
with:
push: true
build-args: |
version=${VERSION}
tags: corehelpers/azurebackup:${{ VERSION }}

Check failure on line 38 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish Container

Invalid workflow file

The workflow is not valid. .github/workflows/publish.yml (Line: 38, Col: 17): Unrecognized named-value: 'VERSION'. Located at position 1 within expression: VERSION