Skip to content

Update publish.yml

Update publish.yml #9

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: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- 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}
platforms: linux/amd64,linux/arm64
tags: corehelpers/azurebackup:${{ env.VERSION }}