Skip to content

⏩ Bump version and appVersion to 0.6.0 #28

⏩ Bump version and appVersion to 0.6.0

⏩ Bump version and appVersion to 0.6.0 #28

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.
name: cert-manager-webhook-ovh actions
on:
push:
tags:
- 0*
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{raw}}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
platforms: linux/arm64,linux/arm/v7,linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
chart-release:
needs:
- build-and-push-image
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: tag-checkout-code
uses: actions/checkout@v3
with:
# # Fetch entire history. Required for chart-releaser; see https://github.com/helm/chart-releaser-action/issues/13#issuecomment-602063896
fetch-depth: 0
- name: tag-package-chart
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cp LICENSE charts/cert-manager-webhook-ovh/
cp README.md charts/cert-manager-webhook-ovh/
mkdir -p tmp/packages
helm package --destination tmp/packages/ charts/cert-manager-webhook-ovh/
cp charts/cert-manager-webhook-ovh/Chart.yaml tmp/
cp artifacthub-repo.yml tmp/
- name: tag-upload-artifacts
uses: actions/upload-artifact@v3
with:
name: chart-archive
path: tmp/
- name: gh-page-checkout-code
uses: actions/checkout@v3
with:
ref: 'gh-pages'
# Fetch entire history. Required for chart-releaser; see https://github.com/helm/chart-releaser-action/issues/13#issuecomment-602063896
fetch-depth: 0
- name: gh-pages-download-artifacts
uses: actions/download-artifact@v3
with:
name: chart-archive
path: tmp
- name: gh-page-configure-git
shell: bash
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: gh-page-index-chart-repo
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
test -d packages || mkdir packages
gh release upload "$GITHUB_REF_NAME" tmp/packages/*
mv tmp/packages/* packages/
mv tmp/Chart.yaml ./
mv tmp/artifacthub-repo.yml ./
helm repo index --url "https://$GITHUB_ACTOR.github.io/$(echo "$GITHUB_REPOSITORY" | cut --delimiter / --fields=2)" .
git add artifacthub-repo.yml index.yaml packages/
git status
git commit -m "Publish $GITHUB_REF_NAME"
git push origin gh-pages