docs: 📚️ update gateway api instructions to current supported version #238
This file contains hidden or 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 Charts | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - 'v*' | |
| env: | |
| tag_prefix: v | |
| hub_manager_tag_prefix: hub-manager_v | |
| permissions: {} | |
| jobs: | |
| traefik: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure Git | |
| run: | | |
| git config user.name "$GITHUB_ACTOR" | |
| git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
| git config --global --add safe.directory /charts | |
| - name: Copy LICENSE, EXAMPLES.md and README.md for packaging | |
| run: | | |
| cp ./README.md ./traefik/README.md | |
| cp ./EXAMPLES.md ./traefik/EXAMPLES.md | |
| cp ./LICENSE ./traefik/LICENSE | |
| - name: Generate default static install | |
| run: | | |
| helm template traefik ./traefik -n traefik > traefik.yaml | |
| - name: Get chart version | |
| id: chart_version | |
| run: | | |
| echo "CHART_VERSION=$(cat traefik/Chart.yaml | awk -F"[ ',]+" '/version:/{print $2}' | head -n 1)" >> $GITHUB_OUTPUT | |
| - name: Check if tag exists | |
| id: tag_exists | |
| run: | | |
| TAG_EXISTS=false | |
| if git tag -l | grep '^${{ env.tag_prefix }}${{ steps.chart_version.outputs.CHART_VERSION }}$' > /dev/null ; then | |
| TAG_EXISTS=true | |
| fi | |
| echo TAG_EXISTS=$TAG_EXISTS >> $GITHUB_OUTPUT | |
| - name: Get Previous tag | |
| id: previous_tag | |
| uses: "WyriHaximus/github-action-get-previous-tag@61819f33034117e6c686e6a31dba995a85afc9de" # v2.0.0 | |
| with: | |
| pattern: v* | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| - name: Tag release | |
| id: tag_version | |
| uses: mathieudutour/github-tag-action@a22cf08638b34d5badda920f9daf6e72c477b07b # v6.2 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| custom_tag: ${{ steps.chart_version.outputs.CHART_VERSION }} | |
| tag_prefix: ${{ env.tag_prefix }} | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| - name: Render changelog configuration | |
| env: | |
| REGEXP: '(\\(.+\\))?' | |
| run: ./hack/render-changelog-config.sh traefik | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| - name: Build Changelog | |
| id: changelog | |
| uses: mikepenz/release-changelog-builder-action@c9bcd8238b6f41e05561348339429d360b1c0247 # v6.2.3 | |
| with: | |
| fromTag: ${{ steps.previous_tag.outputs.tag }} | |
| toTag: ${{ steps.tag_version.outputs.new_tag }} | |
| configuration: "/tmp/changelog.json" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| - name: Create release | |
| uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0 | |
| with: | |
| tag: ${{ steps.tag_version.outputs.new_tag }} | |
| name: ${{ steps.tag_version.outputs.new_tag }} | |
| body: ${{ steps.changelog.outputs.changelog }} | |
| prerelease: ${{ contains(steps.chart_version.outputs.CHART_VERSION, '-') }} | |
| artifacts: "traefik.yaml" | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| # avoid to push both charts | |
| - name: Delete hub-manager chart | |
| run: | | |
| rm -rf hub-manager | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| - name: Import GPG key | |
| uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0 | |
| id: gpg | |
| with: | |
| gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| - name: Prepare GPG key | |
| run: | | |
| gpg --export > ~/.gnupg/pubring.gpg | |
| gpg --batch --pinentry-mode loopback --yes --passphrase '${{ secrets.GPG_PASSPHRASE }}' --export-secret-key > ~/.gnupg/secring.gpg | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| - name: Publish Helm chart | |
| uses: bpsoraggi/helm-gh-pages@2a2569e394590687d2c508516af3c9bb9fe7fa7e | |
| with: | |
| token: ${{ secrets.CHARTS_TOKEN }} | |
| charts_dir: . | |
| charts_url: https://traefik.github.io/charts | |
| owner: traefik | |
| repository: charts | |
| branch: master | |
| target_dir: traefik | |
| index_dir: . | |
| commit_username: traefiker | |
| commit_email: 30906710+traefiker@users.noreply.github.com | |
| key: ${{ steps.gpg.outputs.name }} | |
| private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| - name: Publish Helm chart to the ghcr.io registry | |
| uses: appany/helm-oci-chart-releaser@d94988c92bed2e09c6113981f15f8bb495d10943 # v0.5.0 | |
| with: | |
| name: traefik | |
| repository: traefik/helm | |
| tag: ${{ steps.chart_version.outputs.CHART_VERSION }} | |
| path: ./traefik | |
| registry: ghcr.io | |
| registry_username: traefiker | |
| registry_password: ${{ secrets.GHCR_TOKEN }} | |
| sign: true | |
| signing_key: ${{ steps.gpg.outputs.name }} | |
| signing_passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| - name: Trigger hub-doc synchronization workflow | |
| env: | |
| GH_TOKEN: ${{ secrets.GHCR_TOKEN }} | |
| run: | | |
| gh workflow run -R traefik/hub-doc "🏗️ Sync helm-chart" -F CHART_VERSION=${{ steps.tag_version.outputs.new_tag }} | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| hub-manager: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: 'false' | |
| - name: Configure Git | |
| run: | | |
| git config user.name "$GITHUB_ACTOR" | |
| git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
| git config --global --add safe.directory /charts | |
| - name: Copy LICENSE for packaging | |
| run: | | |
| cp ./LICENSE ./hub-manager/LICENSE | |
| - name: Get chart version | |
| id: chart_version | |
| run: | | |
| echo "CHART_VERSION=$(cat hub-manager/Chart.yaml | awk -F"[ ',]+" '/version:/{print $2}' | head -n 1)" >> $GITHUB_OUTPUT | |
| - name: Check if tag exists | |
| id: tag_exists | |
| run: | | |
| TAG_EXISTS=false | |
| if git tag -l | grep '^${{ env.hub_manager_tag_prefix }}${{ steps.chart_version.outputs.CHART_VERSION }}$' > /dev/null ; then | |
| TAG_EXISTS=true | |
| fi | |
| echo TAG_EXISTS=$TAG_EXISTS >> $GITHUB_OUTPUT | |
| - name: Get Previous tag | |
| id: previous_tag | |
| uses: "WyriHaximus/github-action-get-previous-tag@61819f33034117e6c686e6a31dba995a85afc9de" # v2.0.0 | |
| with: | |
| pattern: "${{ env.hub_manager_tag_prefix }}*" | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| - name: Tag release | |
| id: tag_version | |
| uses: mathieudutour/github-tag-action@a22cf08638b34d5badda920f9daf6e72c477b07b # v6.2 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| custom_tag: ${{ steps.chart_version.outputs.CHART_VERSION }} | |
| tag_prefix: ${{ env.hub_manager_tag_prefix }} | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| - name: Render changelog configuration | |
| env: | |
| REGEXP: '\\((hub-manager-.+)\\)' | |
| run: ./hack/render-changelog-config.sh hub-manager | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| - name: Build Changelog | |
| id: changelog | |
| uses: mikepenz/release-changelog-builder-action@c9bcd8238b6f41e05561348339429d360b1c0247 # v6.2.3 | |
| with: | |
| fromTag: ${{ steps.previous_tag.outputs.tag }} | |
| toTag: ${{ steps.tag_version.outputs.new_tag }} | |
| configuration: "/tmp/changelog.json" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| - name: Create release | |
| uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0 | |
| with: | |
| body: ${{ steps.changelog.outputs.changelog }} | |
| makeLatest: "false" | |
| name: ${{ steps.tag_version.outputs.new_tag }} | |
| prerelease: ${{ contains(steps.chart_version.outputs.CHART_VERSION, '-') }} | |
| tag: ${{ steps.tag_version.outputs.new_tag }} | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| - name: Delete traefik chart | |
| run: | | |
| rm -rf traefik | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| - name: Import GPG key | |
| uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0 | |
| id: gpg | |
| with: | |
| gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| - name: Prepare GPG key | |
| run: | | |
| gpg --export > ~/.gnupg/pubring.gpg | |
| gpg --batch --pinentry-mode loopback --yes --passphrase '${{ secrets.GPG_PASSPHRASE }}' --export-secret-key > ~/.gnupg/secring.gpg | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| - name: Publish Helm chart | |
| uses: bpsoraggi/helm-gh-pages@2a2569e394590687d2c508516af3c9bb9fe7fa7e | |
| with: | |
| token: ${{ secrets.CHARTS_TOKEN }} | |
| charts_dir: . | |
| charts_url: https://traefik.github.io/charts | |
| owner: traefik | |
| repository: charts | |
| branch: master | |
| target_dir: hub-manager | |
| index_dir: . | |
| commit_username: traefiker | |
| commit_email: 30906710+traefiker@users.noreply.github.com | |
| key: ${{ steps.gpg.outputs.name }} | |
| private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
| - name: Publish Helm chart to the ghcr.io registry | |
| uses: appany/helm-oci-chart-releaser@d94988c92bed2e09c6113981f15f8bb495d10943 # v0.5.0 | |
| with: | |
| name: hub-manager | |
| repository: traefik/helm | |
| tag: ${{ steps.chart_version.outputs.CHART_VERSION }} | |
| path: ./hub-manager | |
| registry: ghcr.io | |
| registry_username: traefiker | |
| registry_password: ${{ secrets.GHCR_TOKEN }} | |
| sign: true | |
| signing_key: ${{ steps.gpg.outputs.name }} | |
| signing_passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| if: steps.tag_exists.outputs.TAG_EXISTS == 'false' |