Prepare v0.0.49 #36
Workflow file for this run
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
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.tags }} | |
buildAndPushHelmChart: | |
needs: buildAndPushImage | |
runs-on: ubuntu-latest | |
steps: | |
- 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 ${{ needs.buildAndPushImage.outputs.tags }} | |
- name: helm push | |
if: ${{ github.event_name == 'push' }} | |
run: | | |
helm push ${{ env.CHART_NAME }}-${{ needs.buildAndPushImage.outputs.tags }}.tgz oci://ghcr.io/${{ github.repository_owner }} | |