Skip to content

Prepare v0.0.63

Prepare v0.0.63 #50

Workflow file for this run

name: Docker Image CI
on:
push:
tags:
- "v*.*.*"
env:
IMAGE_NAME: ${{ github.repository }}
REGISTRY: ghcr.io
HELM_PATH_TEST: "./charts/test"
HELM_PATH_DEMO: "./charts/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 }}
# Trying https://github.com/prometheus-community/helm-charts/blob/main/.github/workflows/release.yaml
buildAndPushHelmChart:
needs: buildAndPushImage
runs-on: ubuntu-latest
steps:
- name: Set version
id: vars
run: |
TAG=${{ github.ref }}
VERSION=${TAG#refs/tags/}
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
#
# - name: Set up Helm
# uses: azure/[email protected]
# with:
# version: v3.12.0
#
# - name: Run chart-releaser
# uses: helm/[email protected]
# env:
# CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# CR_GENERATE_RELEASE_NOTES: true
#
# # see https://github.com/helm/chart-releaser/issues/183
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Push charts to GHCR
# run: |
# shopt -s nullglob
# helm push "${pkg}" "oci://ghcr.io/pixelaw/dockertest/charts"
- 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 - test
run: |
helm package $HELM_PATH_TEST --version ${VERSION}
- name: helm push - test
if: ${{ github.event_name == 'push' }}
run: |
helm push dockertest-${VERSION}.tgz oci://ghcr.io/pixelaw