Skip to content

Merge branch 'staging' #51

Merge branch 'staging'

Merge branch 'staging' #51

Workflow file for this run

name: Docker Build
on:
release:
types:
- published
push:
branches:
- dev
- staging
- main
jobs:
docker_publish:
name: Docker Build
runs-on: self-hosted
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Branch name
run: |
BRANCH_NAME=${GITHUB_REF#refs/heads/}
SANITIZED_BRANCH_NAME=${BRANCH_NAME//\//-}
echo "BRANCH_NAME=$SANITIZED_BRANCH_NAME" >> $GITHUB_ENV
- name: Build image with env tag
if: github.ref == 'refs/heads/dev'
|| github.ref == 'refs/heads/staging'
|| github.ref == 'refs/heads/main'
uses: macbre/push-to-ghcr@master
with:
image_name: ${{ github.repository }}
image_tag: ${{ env.BRANCH_NAME }}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build image with semver tag
if: startsWith(github.ref, 'refs/tags/')
uses: macbre/push-to-ghcr@master
with:
image_name: ${{ github.repository }}
github_token: ${{ secrets.GITHUB_TOKEN }}