Skip to content

Merge develop

Merge develop #6

name: Build & Push Jira Release Docker Image to GHCR
on:
pull_request:
branches:
- main
push:
branches:
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: slickdeals/jira-software
COMMIT_SHA: ${{ github.sha }}
jobs:
build_image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: debug
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ env.GITHUB_TOKEN }}
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for the Docker image
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
${{ env.COMMIT_SHA }}
${{ vars.RELEASE_TAG}}
- name: Build, Tag, and push Docker image
uses: docker/build-push-action@v5
with:
context: ./app
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.COMMIT_SHA }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILD_TAG=${{ vars.RELEASE_TAG }}