chore: update lockfiles #96
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 Please | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| # Minimize default permissions; grant elevated permissions only to the | |
| # `release_please` job below. | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| packages: write | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| detect-quota: | |
| # Probe the hosted runner flavor used by release steps so we can fall | |
| # back if necessary. | |
| permissions: {} | |
| runs-on: ubuntu-slim | |
| timeout-minutes: 1 | |
| steps: | |
| - name: Quota probe | |
| id: quota_probe | |
| run: | | |
| echo "probe" | |
| # NOTE: Do not set `continue-on-error: true` on the `detect-quota` job. | |
| # If `continue-on-error` is enabled the job result will always be | |
| # 'success', which defeats detection (we rely on `needs.detect-quota.result`). | |
| # Unfortunately this means the workflow may be reported as failed if the | |
| # hosted runner is unavailable. We cannot work around this until GitHub | |
| # provides a job-level "allow-failure"/neutral-conclusion feature | |
| # (see: https://github.com/actions/runner/issues/2347 for discussion). | |
| release_please: | |
| needs: detect-quota | |
| if: ${{ always() }} | |
| runs-on: ${{ needs.detect-quota.result == 'success' && 'ubuntu-latest' || 'self-hosted' }} | |
| timeout-minutes: 5 | |
| continue-on-error: true | |
| steps: | |
| - name: Release Please | |
| uses: googleapis/release-please-action@v4 | |
| id: release | |
| with: | |
| release-type: node | |
| # From: | |
| # https://github.com/googleapis/release-please-action?tab=readme-ov-file#creating-majorminor-tags | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| if: ${{ steps.release.outputs.release_created }} | |
| - name: Tag Major and Minor Versions | |
| if: ${{ steps.release.outputs.release_created }} | |
| run: | | |
| git config user.name github-actions[bot] | |
| git config user.email github-actions[bot]@users.noreply.github.com | |
| git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" | |
| git tag -d v${{ steps.release.outputs.major }} || true | |
| git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true | |
| git push origin :v${{ steps.release.outputs.major }} || true | |
| git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true | |
| git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}" | |
| git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}" | |
| git push origin v${{ steps.release.outputs.major }} | |
| git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} | |
| - name: Setup QEMU | |
| if: ${{ steps.release.outputs.release_created }} | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Setup Docker Buildx | |
| if: ${{ steps.release.outputs.release_created }} | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| if: ${{ steps.release.outputs.release_created }} | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Docker Metadata | |
| if: ${{ steps.release.outputs.release_created }} | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: | | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| # Commit SHA Tag | |
| # The Tag based on the branch (main) | |
| # The "prod" Tag, indicating a production-ready image | |
| # The Major, Major.Minor, and Major.Minor.Patch tags | |
| tags: | | |
| type=sha | |
| type=ref,event=branch | |
| prod | |
| ${{ steps.release.outputs.major }} | |
| ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} | |
| ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} | |
| - name: Build and Push | |
| if: ${{ steps.release.outputs.release_created }} | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} |