Skip to content

Build and deploy from branch. #51

Build and deploy from branch.

Build and deploy from branch. #51

name: Build, push and update
on:
workflow_dispatch:
inputs:
skip-unit-test:
type: boolean
required: true
description: Skip unit-test
jobs:
build_push_update:
runs-on: ubuntu-latest
environment: dev-cd
permissions:
id-token: write
packages: write
contents: write
steps:
#
# Checkout the source code.
#
- name: Checkout the source code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
token: ${{ secrets.GIT_PAT }}
fetch-depth: 0
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build the app image
uses: docker/build-push-action@v6
with:
push: true
context: .
file: src/main/docker/Dockerfile.multistage
platforms: linux/amd64
tags: ghcr.io/${{ github.repository }}:${{ github.head_ref || github.ref_name }}
secrets: |
"gh_user=${{ secrets.GIT_USER }}"
"gh_token=${{ secrets.GIT_PAT }}"