Skip to content

Upgrade kc-cron-job dev to production #3

Upgrade kc-cron-job dev to production

Upgrade kc-cron-job dev to production #3

name: Upgrade kc-cron-job dev to production
on:
workflow_dispatch:
env:
GITHUB_REGISTRY: ghcr.io
IMAGE_NAME: bcgov/kc-cron-job
jobs:
build-and-push-image:
runs-on: ubuntu-20.04
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- 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: Retag and push image
run: |
docker pull ghcr.io/bcgov/kc-cron-job:dev
docker tag ghcr.io/bcgov/kc-cron-job:dev ghcr.io/bcgov/kc-cron-job:prod
docker push ghcr.io/bcgov/kc-cron-job:prod