From 4ffbf882d934557b4ad47eff3109c10580de8c96 Mon Sep 17 00:00:00 2001 From: Anthony Rabbito Date: Fri, 28 Jun 2024 11:26:05 -0400 Subject: [PATCH] fix: hacks Signed-off-by: Anthony Rabbito --- .github/workflows/charts-publish-oci.yaml | 35 +++++++++++++++++++++++ .github/workflows/release.yaml | 21 ++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/workflows/charts-publish-oci.yaml create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/charts-publish-oci.yaml b/.github/workflows/charts-publish-oci.yaml new file mode 100644 index 0000000..ed15719 --- /dev/null +++ b/.github/workflows/charts-publish-oci.yaml @@ -0,0 +1,35 @@ +name: "Charts: Publish to GHCR OCI" + +on: + release: + types: [published] + workflow_dispatch: {} + +jobs: + publish-charts: + name: Publish chart + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Install Helm + uses: azure/setup-helm@v4 + + - name: Package & Push Helm Charts + shell: bash + run: | + helm package chart/tailscale-derp --dependency-update + pkg=$(ls tailscale-derp-*.tgz) + helm push "${pkg}" oci://ghcr.io/${{ github.repository }}/chart diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..6d5e113 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,21 @@ +name: "Release" + +on: + workflow_dispatch: {} + push: + branches: [main] + +jobs: + release: + name: Release + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-22.04 + steps: + - name: release + uses: googleapis/release-please-action@v4 + id: release + with: + config-file: .github/release-please-config.json + manifest-file: .github/.release-please-manifest.json