Bump actions/setup-node from 6.4.0 to 7.0.0 (#47) #111
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: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| publish_ingest_image: | |
| description: "Build and publish the AgentPond ingest service image for the current package version" | |
| required: false | |
| default: false | |
| type: boolean | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write | |
| packages: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| with: | |
| version: 11.7.0 | |
| - name: Setup Node | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org | |
| package-manager-cache: false | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm build | |
| - name: Test | |
| run: pnpm test | |
| - name: Determine release PR title | |
| id: release-pr-title | |
| if: github.event_name == 'push' | |
| run: | | |
| export STATUS_FILE="${RUNNER_TEMP:-/tmp}/changeset-status.json" | |
| pnpm changeset status --output "$STATUS_FILE" || true | |
| VERSION="$( | |
| jq -r '(.releases[] | select(.name == "agentpond") | .newVersion) // .releases[0].newVersion // empty' "$STATUS_FILE" | |
| )" | |
| if [ -n "$VERSION" ]; then | |
| echo "title=Release: agentpond $VERSION" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "title=Release: agentpond" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Configure release PR git credentials | |
| if: github.event_name == 'push' | |
| run: git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create release PR or publish | |
| id: changesets | |
| if: github.event_name == 'push' | |
| uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1.9.0 | |
| with: | |
| version: pnpm version-packages | |
| publish: pnpm release | |
| title: ${{ steps.release-pr-title.outputs.title }} | |
| commit: ${{ steps.release-pr-title.outputs.title }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set image version | |
| id: image-version | |
| if: contains(steps.changesets.outputs.publishedPackages, '@agentpond/ingest-service') || inputs.publish_ingest_image == true | |
| run: | | |
| VERSION="$(node -p "require('./apps/ingest/package.json').version")" | |
| if [ -z "$VERSION" ]; then | |
| echo "Could not determine ingest image version" >&2 | |
| exit 1 | |
| fi | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Setup Docker Buildx | |
| if: steps.image-version.outputs.version != '' | |
| uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0 | |
| - name: Login to GHCR | |
| if: steps.image-version.outputs.version != '' | |
| uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and publish GHCR image | |
| if: steps.image-version.outputs.version != '' | |
| uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: | | |
| ghcr.io/marcusschiesser/agentpond:${{ steps.image-version.outputs.version }} | |
| ghcr.io/marcusschiesser/agentpond:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Verify GHCR image is public | |
| if: steps.image-version.outputs.version != '' | |
| run: | | |
| docker logout ghcr.io | |
| docker image rm ghcr.io/marcusschiesser/agentpond:${{ steps.image-version.outputs.version }} || true | |
| docker pull ghcr.io/marcusschiesser/agentpond:${{ steps.image-version.outputs.version }} |