Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix issue where attempt to write public keys were performed in non-ku… #102

fix issue where attempt to write public keys were performed in non-ku…

fix issue where attempt to write public keys were performed in non-ku… #102

Workflow file for this run

name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
release:
name: SLV Release
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Setting SLV Version
run: echo "SLV_VERSION=${GITHUB_REF_NAME:1}" >> $GITHUB_ENV
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Releasing SLV
run: |
docker run --rm \
-w /workspace \
-v $PWD:/workspace \
-e GITHUB_TOKEN \
-e HOMEBREW_SSH_KEY \
ghcr.io/goreleaser/goreleaser-cross:latest release \
--clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_SSH_KEY: ${{ secrets.HOMEBREW_SSH_KEY }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Release SLV Image
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
context: .
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ env.SLV_VERSION }}
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
- name: Setup Helm
uses: azure/setup-helm@v4
- name: Helm Release Charts
run: |
echo '{{- define "slvlib.crd" -}}' > internal/k8s/charts/slv-lib/templates/_crd.tpl
cat internal/k8s/config/crd/bases/slv.sh_slvs.yaml >> internal/k8s/charts/slv-lib/templates/_crd.tpl
echo '{{- end -}}' >> internal/k8s/charts/slv-lib/templates/_crd.tpl
sed -i "s/0\.0\.0/${SLV_VERSION}/g" internal/k8s/charts/slv-lib/Chart.yaml
sed -i "s/0\.0\.0/${SLV_VERSION}/g" internal/k8s/charts/slv-operator/Chart.yaml
sed -i "s/0\.0\.0/${SLV_VERSION}/g" internal/k8s/charts/slv-job/Chart.yaml
helm dep update ./internal/k8s/charts/slv-operator
helm dep update ./internal/k8s/charts/slv-job
helm package ./internal/k8s/charts/slv-operator --version ${{ env.SLV_VERSION }} --destination .
helm package ./internal/k8s/charts/slv-job --version ${{ env.SLV_VERSION }} --destination .
helm push ./slv-operator-${{ env.SLV_VERSION }}.tgz oci://ghcr.io/${{ github.repository }}/charts
helm push ./slv-job-${{ env.SLV_VERSION }}.tgz oci://ghcr.io/${{ github.repository }}/charts
- name: Force Tagging Major Version
run: |
FULL_VER_TAG=${{ github.ref_name }}
MAJOR_VER_TAG=$(echo "$FULL_VER_TAG" | grep -oE '^v[0-9]+')
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git tag -f "$MAJOR_VER_TAG"
git push origin "$MAJOR_VER_TAG" --force
pages:
name: Publish Pages
needs: release
uses: ./.github/workflows/pages.yaml
permissions:
contents: read
packages: read
pages: write
id-token: write
secrets: inherit
test:
name: Test Action
needs: release
uses: ./.github/workflows/test.yaml
permissions:
contents: read
secrets: inherit