Create and publish a devevlopment Backup Storage Image #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/bcgov/helm-charts/tree/master/charts/backup-storage#build-the-container-image-using-github-actions | |
name: Create and publish Backup Storage Docker image Gold | |
on: | |
workflow_dispatch: | |
inputs: | |
replace_docker_image: | |
description: 'Do we use a custom docker image?' | |
type: boolean | |
required: true | |
default: 'false' | |
env: | |
GITHUB_REGISTRY: ghcr.io | |
IMAGE_NAME: bcgov/backup-storage | |
jobs: | |
build-and-push-image: | |
runs-on: ubuntu-20.04 | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout the sso-repos | |
uses: actions/checkout@v4 | |
- name: Checkout backup storage repository | |
run: git clone https://github.com/BCDevOps/backup-container.git | |
- name: Replace the dockerfile | |
if: ${{ github.event.inputs.replace_docker_image == 'true'}} | |
run: cp ./docker/backup-container/* ./backup-container/docker | |
- name: Log in to the GitHub Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.GITHUB_REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: backup-container/docker | |
push: true | |
tags: ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:postgres-15-test | |
labels: sso-keycloak-backup |