fix: upgrade conventional-actions to node24 #288
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
| # Code generated by shipbuilder init 1.21.0. DO NOT EDIT. | |
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| outputs: | |
| version: ${{ steps.version.outputs.version }} | |
| version-major: ${{ steps.version.outputs.version-major-only }} | |
| version-minor: ${{ format('{0}.{1}', steps.version.outputs.version-major-only, steps.version.outputs.version-minor-only) }} | |
| version-patch: ${{ format('{0}.{1}.{2}', steps.version.outputs.version-major-only, steps.version.outputs.version-minor-only, steps.version.outputs.version-patch-only) }} | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Generate next version | |
| id: version | |
| uses: conventional-actions/next-version@1b3e4803a0bdf7435ba7bb5ace077445ed54e82a # v1.1.8 | |
| - name: Setup .netrc | |
| uses: conventional-actions/setup-netrc@v1 | |
| - name: Setup Go | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: "1.22" | |
| cache: true | |
| - name: Extract Go module metadata | |
| uses: conventional-actions/go-metadata@v1 | |
| id: metadata | |
| - name: Setup Go version | |
| uses: conventional-actions/go-version@v1 | |
| with: | |
| version: ${{ steps.version.outputs.version }} | |
| package: ${{ steps.metadata.outputs.module }} | |
| variable: Version | |
| - name: Build Go code | |
| uses: conventional-actions/go-build@v1 | |
| with: | |
| ldflags: '-s -w' | |
| package: | | |
| ./cmd/ketch | |
| platforms: | | |
| linux/amd64 | |
| linux/arm64 | |
| darwin/amd64 | |
| darwin/arm64 | |
| windows/amd64 | |
| - uses: actions/upload-artifact@v3 | |
| with: | |
| name: docker | |
| path: docker | |
| package-ketch: | |
| name: Package ketch | |
| needs: build | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Download docker artifact | |
| uses: actions/download-artifact@v3 | |
| with: | |
| name: docker | |
| path: docker | |
| - name: Download ketch-cli amd64 binary | |
| uses: actions/download-artifact@v3 | |
| with: | |
| name: ketch_linux_amd64 | |
| path: .build/linux-amd64 | |
| - name: Download ketch-cli arm64 docker | |
| uses: actions/download-artifact@v3 | |
| with: | |
| name: ketch_linux_arm64 | |
| path: .build/linux-arm64 | |
| - name: Set up QEMU | |
| id: qemu | |
| uses: docker/setup-qemu-action@v2 | |
| with: | |
| platforms: linux/amd64,linux/arm64 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| with: | |
| buildkitd-flags: '--allow-insecure-entitlement network.host' | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ env.GITHUB_TOKEN }} | |
| - name: Metadata for ketch-cli | |
| id: meta | |
| uses: docker/metadata-action@v4 | |
| with: | |
| images: ghcr.io/${{ github.repository_owner }}/ketch-cli | |
| tags: | | |
| type=raw,value=latest | |
| type=raw,value=${{ needs.build.outputs.version-major }} | |
| type=raw,value=${{ needs.build.outputs.version-minor }} | |
| type=raw,value=${{ needs.build.outputs.version-patch }} | |
| - name: Push ketch-cli container | |
| if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) | |
| uses: docker/build-push-action@v3 | |
| with: | |
| context: . | |
| file: docker/ketch-cli/Dockerfile | |
| push: true | |
| allow: network.host | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| platforms: linux/amd64,linux/arm64 | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| release: | |
| name: Release | |
| if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) | |
| needs: | |
| - build | |
| - package-ketch | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Create Release | |
| uses: conventional-actions/create-release@c025b7306d14a25901b72486f97f3ebe7662a8ed # v1.0.31 | |
| with: | |
| tag_name: ${{ needs.build.outputs.version }} | |
| artifacts: '*' | |
| concurrency: | |
| cancel-in-progress: true | |
| group: ${{ github.workflow }}-${{ github.ref }} |