v0.19.9 #427
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: Release | |
on: | |
release: | |
types: [created] | |
jobs: | |
publish: | |
if: startsWith(github.ref, 'refs/tags/v') == true | |
name: Publish vcluster | |
runs-on: ubuntu-22.04 | |
permissions: | |
id-token: write # This is the key for OIDC cosign! | |
packages: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: git fetch --force --tags | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
cache: false | |
go-version: "1.22" | |
- name: Setup Just | |
uses: extractions/setup-just@v2 | |
- name: Setup Cosign | |
uses: sigstore/cosign-installer@main | |
with: | |
cosign-release: "v2.2.3" | |
- name: Setup Syft | |
uses: anchore/sbom-action/download-syft@v0.15.1 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- uses: azure/setup-helm@v4 | |
with: | |
version: "v3.0.2" | |
- id: get_version | |
run: | | |
RELEASE_VERSION=$(echo $GITHUB_REF | sed -nE 's!refs/tags/!!p') | |
echo "release_version=$RELEASE_VERSION" >> "$GITHUB_OUTPUT" | |
echo "previous_tag=$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))" >> "$GITHUB_OUTPUT" | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Login to ghcr.io | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: "goreleaser/goreleaser-action@v5" | |
with: | |
args: release --clean --timeout 60m | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
TELEMETRY_PRIVATE_KEY: ${{ secrets.VCLUSTER_TELEMETRY_PRIVATE_KEY }} | |
GORELEASER_CURRENT_TAG: ${{ steps.get_version.outputs.release_version }} | |
GORELEASER_PREVIOUS_TAG: ${{ steps.get_version.outputs.previous_tag }} | |
- name: Save release assets | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release-assets | |
path: release/ | |
- name: Attach assets to release | |
uses: FabianKramm/release-asset-action@v1 | |
with: | |
pattern: "release/*" | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
publish-chart: | |
if: startsWith(github.ref, 'refs/tags/v') == true | |
needs: [publish] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- uses: azure/setup-helm@v4 | |
with: | |
version: "v3.0.2" | |
- run: | | |
RELEASE_VERSION=$(echo $GITHUB_REF | sed -nE 's!refs/tags/v!!p') | |
helm plugin install https://github.com/chartmuseum/helm-push.git | |
helm repo add chartmuseum $CHART_MUSEUM_URL --username $CHART_MUSEUM_USER --password $CHART_MUSEUM_PASSWORD | |
helm cm-push --force --version="$RELEASE_VERSION" --app-version="$RELEASE_VERSION" charts/k3s/ chartmuseum | |
helm cm-push --force --version="$RELEASE_VERSION" --app-version="$RELEASE_VERSION" charts/k0s/ chartmuseum | |
helm cm-push --force --version="$RELEASE_VERSION" --app-version="$RELEASE_VERSION" charts/k8s/ chartmuseum | |
helm cm-push --force --version="$RELEASE_VERSION" --app-version="$RELEASE_VERSION" charts/eks/ chartmuseum | |
env: | |
CHART_MUSEUM_URL: "https://charts.loft.sh/" | |
CHART_MUSEUM_USER: ${{ secrets.CHART_MUSEUM_USER }} | |
CHART_MUSEUM_PASSWORD: ${{ secrets.CHART_MUSEUM_PASSWORD }} |