chore: bump OpenBao to v2.5.5 (#191) #86
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 | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'charts/**' | |
| jobs: | |
| check-versions: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| outputs: | |
| should_release: ${{ steps.check-versions.outputs.should_release }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Check latest version | |
| id: check-versions | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| current_version=$(yq .version ./charts/openbao/Chart.yaml) | |
| url="https://api.github.com/repos/openbao/openbao-helm/releases/latest" | |
| latest_version=$(curl -sSfL -H "Authorization: Bearer ${GITHUB_TOKEN}" "$url" | jq -r '.tag_name' | sed 's/openbao-//') | |
| if [ "$current_version" != "$latest_version" ]; then | |
| echo "should_release=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "should_release=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| release: | |
| needs: check-versions | |
| if: needs.check-versions.outputs.should_release == 'true' | |
| environment: helm-release | |
| permissions: | |
| contents: write | |
| packages: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure Git | |
| run: | | |
| git config user.name "$GITHUB_ACTOR" | |
| git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
| - name: Run chart-releaser | |
| id: helm-release | |
| uses: helm/chart-releaser-action@cae68fefc6b5f367a0275617c9f83181ba54714f # v1.7.0 | |
| env: | |
| CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| CR_GENERATE_RELEASE_NOTES: true | |
| - name: Login to GHCR | |
| uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Push Helm chart to GHCR as OCI artifact | |
| run: | | |
| chart_registry="ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts" | |
| for pkg in .cr-release-packages/*.tgz; do | |
| if [ -z "${pkg:-}" ]; then | |
| break | |
| fi | |
| helm push "${pkg}" "oci://${chart_registry}" | |
| done | |
| ocm: | |
| permissions: | |
| packages: write | |
| needs: | |
| - release | |
| name: Release OCM Artifact | |
| uses: ./.github/workflows/job-ocm.yaml | |
| secrets: inherit |