Skip to content

Merge pull request #3 from Slickdeals/OPS-10298-update-jira #3

Merge pull request #3 from Slickdeals/OPS-10298-update-jira

Merge pull request #3 from Slickdeals/OPS-10298-update-jira #3

name: Build & Push Jira Release Docker Image to GHCR
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
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
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ 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 }}