Skip to content

Only provision File Storage Account if defined #18

Only provision File Storage Account if defined

Only provision File Storage Account if defined #18

Workflow file for this run

name: Create and publish Docker image
on:
push:
branches:
- '*'
tags:
- "v*.*.*"
workflow_call:
concurrency:
group: ${{ github.repository }}__${{ github.ref }}-cd
cancel-in-progress: true
env:
REGISTRY: ghcr.io
IMAGE_NAME: torqit/pimcore-azure-provisioning
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:test
- name: Test Docker image
run: |
docker run ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:test /bin/bash -c 'az bicep build -f bicep/main.bicep'
- name: Push Docker image
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}