-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (40 loc) · 1.44 KB
/
publish-image-backup-storage-gold.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# 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?'
required: true
default: 'false'
options: ['true', '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