Skip to content

Prepare v0.0.55

Prepare v0.0.55 #42

Workflow file for this run

name: Docker Image CI
on:
push:
tags:
- "v*.*.*"
env:
IMAGE_NAME: ${{ github.repository }}
REGISTRY: ghcr.io
HELM_PATH_TEST: "./deployment/test"
HELM_PATH_DEMO: "./deployment/demo"
jobs:
buildAndPushImage:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=pr
type=semver,pattern={{version}}
type=sha
# - name: Build and push Docker image
# uses: docker/build-push-action@v5
# with:
# context: .
# push: true
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
# cache-from: type=registry,ref=pixelaw/core:latest
# cache-to: type=inline
outputs:
tags: ${{ steps.build.outputs.version }}
buildAndPushHelmChart:
needs: buildAndPushImage
runs-on: ubuntu-latest
steps:
- name: Set version
id: vars
run: |
TAG=${{ github.ref }}
VERSION=${TAG#refs/tags/}
echo "app_version=$VERSION" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- name: helm lint
run: |
helm lint $HELM_PATH_TEST
- name: helm login
run: |
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io -u $ --password-stdin
- name: helm package
run: |
helm package $HELM_PATH_TEST --version ${VERSION}
- name: helm push
if: ${{ github.event_name == 'push' }}
run: |
helm push ${{ env.CHART_NAME }}-${VERSION}.tgz oci://ghcr.io/${{ github.repository_owner }}