diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d15685a..6287cee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,10 +10,11 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 - - uses: actions/setup-go@v6 + - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: - go-version: '1.26' + go-version: '1.26.4' + cache: false - name: Configure Git for private repos run: git config --global url."https://x-access-token:${{ secrets.RELEASES_TOKEN }}@github.com/".insteadOf "https://github.com/" - run: go test -race ./... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 991e51e..70fac6d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,29 +12,24 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: fetch-depth: 0 - - uses: actions/setup-go@v6 + - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: go-version-file: go.mod - cache: true + cache: false - name: Configure Go private modules run: git config --global url."https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/" - - - name: Install wfctl v0.74.5 - run: | - mkdir -p "${RUNNER_TEMP}/wfctl-bin" - curl -sSfL -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - -o "${RUNNER_TEMP}/wfctl-bin/wfctl" \ - "https://github.com/GoCodeAlone/workflow/releases/download/v0.74.5/wfctl-linux-amd64" - chmod +x "${RUNNER_TEMP}/wfctl-bin/wfctl" + - uses: GoCodeAlone/setup-wfctl@bcd880980f5bbe8d192d0c20ff6279d25331f956 # v1 + with: + version: v0.74.6 - name: Validate plugin contract for publish (pre-build) - run: "${{ runner.temp }}/wfctl-bin/wfctl plugin validate-contract --for-publish --tag ${{ github.ref_name }} ." + run: "wfctl plugin validate-contract --for-publish --tag ${{ github.ref_name }} ." - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v7 + uses: goreleaser/goreleaser-action@5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89 # v7.2.2 with: version: "~> v2" args: release --clean @@ -54,9 +49,9 @@ jobs: jq '.[] | {name, type, goos, goarch, path}' dist/artifacts.json exit 0 fi - "${{ runner.temp }}/wfctl-bin/wfctl" plugin verify-capabilities --binary "$BIN" . + wfctl plugin verify-capabilities --binary "$BIN" . - name: Verify shipped plugin.json carries tag (post-build) - run: "${{ runner.temp }}/wfctl-bin/wfctl plugin validate-contract --for-publish --tag ${{ github.ref_name }} --release-dir . ." + run: "wfctl plugin validate-contract --for-publish --tag ${{ github.ref_name }} --release-dir . ." - name: Publish GitHub release if: ${{ success() }} env: @@ -75,7 +70,7 @@ jobs: && github.repository == 'GoCodeAlone/workflow-plugin-ci-generator' steps: - name: Trigger registry manifest sync - uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4 + uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1 with: token: ${{ secrets.repo_dispatch_token }} repository: GoCodeAlone/workflow-registry diff --git a/go.mod b/go.mod index 6c9b2a2..dfe2d65 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/GoCodeAlone/workflow-plugin-ci-generator -go 1.26.0 +go 1.26.4 require ( github.com/GoCodeAlone/workflow v0.74.5