Skip to content

Release Version: 0.4.0 #12

Release Version: 0.4.0

Release Version: 0.4.0 #12

name: Update Code and Push Docker Image
on:
push:
tags:
- "*"
workflow_dispatch:
inputs:
tag:
description: "Repository tag (e.g., 1.2.3)"
required: true
env:
python-version: "3.10"
jobs:
CD:
name: CD
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- name: Set up the environment
uses: ./.github/actions/setup-python-env
with:
python-version: ${{ matrix.python-version }}
- name: Set ENV Variables
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "TAG_NAME=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
else
echo "TAG_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
fi
echo "CREATED=$(date --rfc-3339=seconds | sed 's/ /T/')" >> $GITHUB_ENV
- name: build and push
run: |
set -ux
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
./kustomize/scripts/build_and_push.sh ${TAG_NAME}
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ failure() }}