chore(deps): bump immutable from 3.8.2 to 4.3.8 #92
Workflow file for this run
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
| # This workflow runs when a Release PR is merged to publish packages | |
| # | |
| # OIDC Configuration: | |
| # This workflow uses OpenID Connect (OIDC) for npm authentication | |
| # instead of long-lived npm tokens. Provenance is automatically | |
| # generated for published packages. | |
| name: Release | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| - main | |
| types: | |
| - closed | |
| env: | |
| DOCKER_HUB_BASE_NAME: honkit/honkit | |
| NODE_VERSION: 22 | |
| jobs: | |
| release: | |
| if: | | |
| github.event.pull_request.merged == true && | |
| contains(github.event.pull_request.labels.*.name, 'Type: Release') | |
| runs-on: ubuntu-latest | |
| environment: npm | |
| permissions: | |
| contents: write | |
| id-token: write # Required for OIDC npm authentication | |
| pull-requests: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| persist-credentials: false | |
| - name: Get package info | |
| id: package | |
| run: | | |
| VERSION=$(jq -r '.version' package.json) | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Check if tag exists | |
| id: tag-check | |
| run: | | |
| if git rev-parse "v$VERSION" >/dev/null 2>&1; then | |
| echo "exists=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "exists=false" >> $GITHUB_OUTPUT | |
| fi | |
| env: | |
| VERSION: ${{ steps.package.outputs.version }} | |
| - name: Setup pnpm | |
| if: steps.tag-check.outputs.exists == 'false' | |
| uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | |
| - name: Setup Node.js | |
| if: steps.tag-check.outputs.exists == 'false' | |
| uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install latest npm | |
| if: steps.tag-check.outputs.exists == 'false' | |
| run: | | |
| echo "Current npm version: $(npm -v)" | |
| npm install -g npm@latest | |
| echo "Updated npm version: $(npm -v)" | |
| - name: Install dependencies | |
| if: steps.tag-check.outputs.exists == 'false' | |
| run: pnpm install --frozen-lockfile | |
| - name: Build packages | |
| if: steps.tag-check.outputs.exists == 'false' | |
| run: npm run build | |
| - name: Publish to npm with provenance | |
| if: steps.tag-check.outputs.exists == 'false' | |
| run: pnpm -r publish --access public --no-git-checks | |
| env: | |
| NPM_CONFIG_PROVENANCE: true | |
| - name: Create Git Tag | |
| if: steps.tag-check.outputs.exists == 'false' | |
| uses: pkgdeps/git-tag-action@ef111413f44ebe5cc05994e7f5b5b9edaaada08d # v3.0.0 | |
| with: | |
| version: ${{ steps.package.outputs.version }} | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| github_repo: ${{ github.repository }} | |
| git_commit_sha: ${{ github.sha }} | |
| git_tag_prefix: "v" | |
| - name: Create GitHub Release | |
| id: create-release | |
| if: steps.tag-check.outputs.exists == 'false' | |
| uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: v${{ steps.package.outputs.version }} | |
| name: ${{ github.event.pull_request.title }} | |
| body: ${{ github.event.pull_request.body }} | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: ${{ !github.event.pull_request.body }} | |
| - name: Comment on PR - Success | |
| if: | | |
| always() && | |
| github.event_name == 'pull_request' && | |
| steps.tag-check.outputs.exists == 'false' && | |
| success() | |
| uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
| env: | |
| PACKAGE_VERSION: ${{ steps.package.outputs.version }} | |
| with: | |
| github-token: ${{secrets.GITHUB_TOKEN}} | |
| script: | | |
| const packageVersion = process.env.PACKAGE_VERSION; | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: `🎉 Release https://github.com/${context.repo.owner}/${context.repo.repo}/releases/tag/v${packageVersion}` | |
| }) | |
| push: | |
| needs: release | |
| if: | | |
| github.event.pull_request.merged == true && | |
| contains(github.event.pull_request.labels.*.name, 'Type: Release') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 | |
| - name: Cache Docker layers | |
| uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: ${{ runner.os }}-buildx-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-buildx- | |
| - name: Set Honkit package version | |
| run: echo "PACKAGE_VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV | |
| - name: Build image | |
| run: | | |
| docker buildx build \ | |
| --build-arg NODE_VERSION=${NODE_VERSION} \ | |
| --build-arg PACKAGE_VERSION=${PACKAGE_VERSION} \ | |
| --tag ${DOCKER_HUB_BASE_NAME}:v${PACKAGE_VERSION} \ | |
| --cache-from type=local,src=/tmp/.buildx-cache \ | |
| --cache-to type=local,dest=/tmp/.buildx-cache-new,mode=max \ | |
| --load \ | |
| . | |
| working-directory: ./docker | |
| - name: Print node version in container image | |
| run: docker run --rm ${DOCKER_HUB_BASE_NAME}:v${PACKAGE_VERSION} --version | |
| - name: Set latest tag | |
| run: docker tag ${DOCKER_HUB_BASE_NAME}:v${PACKAGE_VERSION} ${DOCKER_HUB_BASE_NAME}:latest | |
| - name: Set major version tag | |
| run: docker tag ${DOCKER_HUB_BASE_NAME}:v${PACKAGE_VERSION} ${DOCKER_HUB_BASE_NAME}:v$(echo $PACKAGE_VERSION | cut -f 1 -d . | tr -d "\n") | |
| - name: Login to Registries | |
| run: echo "${DOCKER_HUB_TOKEN}" | docker login -u ${DOCKER_HUB_USER} --password-stdin | |
| env: | |
| DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} | |
| DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} | |
| - name: Push to Docker Hub | |
| run: docker push ${DOCKER_HUB_BASE_NAME} --all-tags | |
| - name: Move cache | |
| run: | | |
| rm -rf /tmp/.buildx-cache | |
| mv /tmp/.buildx-cache-new /tmp/.buildx-cache |