From 710afecf61b202f51ac55e51ecc9bef18ca41843 Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Wed, 17 May 2023 08:57:28 -0400 Subject: [PATCH] build: update deprecated GitHub Actions (#17218) Many of the GitHub Actions from the build pipeline are written in a truly ancient version of NodeJS. Upgrade to more recent versions. Remove RelEng from codeowners --- .github/workflows/build.yml | 40 +++++++++++++------------- .github/workflows/ember-assets.yml | 4 +-- .github/workflows/ember-test-audit.yml | 12 ++++---- .github/workflows/release.yml | 6 ++-- .github/workflows/semgrep.yml | 2 +- CODEOWNERS | 4 +-- 6 files changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dcfb80273..1d46d964a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: outputs: go-version: ${{ steps.get-go-version.outputs.go-version }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.build-ref }} - name: Determine Go version @@ -43,7 +43,7 @@ jobs: outputs: product-version: ${{ steps.get-product-version.outputs.product-version }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.build-ref }} - name: get product version @@ -58,18 +58,18 @@ jobs: filepath: ${{ steps.generate-metadata-file.outputs.filepath }} steps: - name: "Checkout directory" - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.build-ref }} - name: Generate metadata file id: generate-metadata-file - uses: hashicorp/actions-generate-metadata@v1.0.1 + uses: hashicorp/actions-generate-metadata@v1.1.1 with: version: ${{ needs.get-product-version.outputs.product-version }} product: ${{ env.PKG_NAME }} repositoryOwner: "hashicorp" sha: ${{ github.event.inputs.build-ref }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: metadata.json path: ${{ steps.generate-metadata-file.outputs.filepath }} @@ -86,11 +86,11 @@ jobs: name: Go ${{ needs.get-go-version.outputs.go-version }} ${{ matrix.goos }} ${{ matrix.goarch }} build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.build-ref }} - name: Setup go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: go-version: ${{ needs.get-go-version.outputs.go-version }} @@ -98,7 +98,7 @@ jobs: run: make deps - name: Setup node and yarn - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: "14" cache-dependency-path: "ui/yarn.lock" @@ -120,7 +120,7 @@ jobs: run: | make pkg/${{ matrix.goos }}_${{ matrix.goarch }}.zip mv pkg/${{ matrix.goos }}_${{ matrix.goarch }}.zip ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip path: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip @@ -137,11 +137,11 @@ jobs: name: Go ${{ needs.get-go-version.outputs.go-version }} ${{ matrix.goos }} ${{ matrix.goarch }} build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.build-ref }} - name: Setup go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: go-version: ${{ needs.get-go-version.outputs.go-version }} @@ -149,7 +149,7 @@ jobs: run: make deps - name: Setup node and yarn - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: "14" cache-dependency-path: "ui/yarn.lock" @@ -196,7 +196,7 @@ jobs: run: | make pkg/${{ matrix.goos }}_${{ matrix.goarch }}.zip mv pkg/${{ matrix.goos }}_${{ matrix.goarch }}.zip ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip path: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip @@ -224,12 +224,12 @@ jobs: echo "RPM_PACKAGE=$(basename out/*.rpm)" >> $GITHUB_ENV echo "DEB_PACKAGE=$(basename out/*.deb)" >> $GITHUB_ENV - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ env.RPM_PACKAGE }} path: out/${{ env.RPM_PACKAGE }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ env.DEB_PACKAGE }} path: out/${{ env.DEB_PACKAGE }} @@ -246,12 +246,12 @@ jobs: name: Go ${{ needs.get-go-version.outputs.go-version }} ${{ matrix.goos }} ${{ matrix.goarch }} build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.build-ref }} - name: Setup go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: go-version: ${{ needs.get-go-version.outputs.go-version }} @@ -259,7 +259,7 @@ jobs: run: make deps - name: Setup node and yarn - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: "14" cache-dependency-path: "ui/yarn.lock" @@ -281,7 +281,7 @@ jobs: run: | make pkg/${{ matrix.goos }}_${{ matrix.goarch }}.zip mv pkg/${{ matrix.goos }}_${{ matrix.goarch }}.zip ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip path: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip @@ -303,7 +303,7 @@ jobs: # version: ${{needs.get-product-version.outputs.product-version}} # steps: - # - uses: actions/checkout@v2 + # - uses: actions/checkout@v3 # - name: Docker Build (Action) # uses: hashicorp/actions-docker-build@v1 # with: diff --git a/.github/workflows/ember-assets.yml b/.github/workflows/ember-assets.yml index 7aabe3880..e68add8ad 100644 --- a/.github/workflows/ember-assets.yml +++ b/.github/workflows/ember-assets.yml @@ -11,11 +11,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2-beta + - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Use Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: '14' - uses: backspace/ember-asset-size-action@edit-comment diff --git a/.github/workflows/ember-test-audit.yml b/.github/workflows/ember-test-audit.yml index 3f5464e02..fc95622de 100644 --- a/.github/workflows/ember-test-audit.yml +++ b/.github/workflows/ember-test-audit.yml @@ -15,36 +15,36 @@ jobs: time-base: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.base.sha }} - uses: nanasess/setup-chromedriver@master - name: Use Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: '14' - run: yarn --frozen-lockfile - run: mkdir -p /tmp/test-reports - run: npx ember-test-audit 1 --json --output ../base-audit.json - name: Upload result - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: base-audit path: base-audit.json time-pr: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: nanasess/setup-chromedriver@master - name: Use Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: '14' - run: yarn --frozen-lockfile - run: mkdir -p /tmp/test-reports - run: npx ember-test-audit 1 --json --output ../pr-audit.json - name: Upload result - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: pr-audit path: pr-audit.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9de1eef76..739ad8b68 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,7 +53,7 @@ jobs: exit 1 fi - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Git run: | @@ -72,12 +72,12 @@ jobs: echo "::set-output name=go-version::$(cat .go-version)" - name: Setup go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: go-version: ${{ steps.get-go-version.outputs.go-version }} - name: Setup node and yarn - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: "14" cache-dependency-path: "ui/yarn.lock" diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index f637f3772..9ba631550 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -14,5 +14,5 @@ jobs: # Skip any PR created by dependabot to avoid permission issues if: (github.actor != 'dependabot[bot]') steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: returntocorp/semgrep-action@v1 diff --git a/CODEOWNERS b/CODEOWNERS index b86381c01..73cfb9f9e 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,4 +1,4 @@ # release configuration -/.release/ @hashicorp/release-engineering @hashicorp/github-nomad-core @hashicorp/nomad-eng -/.github/workflows/build.yml @hashicorp/release-engineering @hashicorp/github-nomad-core @hashicorp/nomad-eng +/.release/ @hashicorp/github-nomad-core @hashicorp/nomad-eng +/.github/workflows/build.yml @hashicorp/github-nomad-core @hashicorp/nomad-eng