diff --git a/.github/workflows/auto-approve-dependabot.yml b/.github/workflows/auto-approve-dependabot.yml deleted file mode 100644 index eb72db7cce..0000000000 --- a/.github/workflows/auto-approve-dependabot.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Auto approve dependabot -# Warning: The pull_request_target event is granted a read/write repository -# token and can access secrets, even when it is triggered from a fork. Although -# the workflow runs in the context of the base of the pull request, you should -# make sure that you do not check out, build, or run untrusted code from the -# pull request with this event. Additionally, any caches share the same scope as -# the base branch, and to help prevent cache poisoning, you should not save the -# cache if there is a possibility that the cache contents were altered. -on: pull_request_target -jobs: - approve: - if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' - runs-on: ubuntu-latest - steps: - - uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # ratchet:hmarr/auto-approve-action@v4.0.0 - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/lambda.yml b/.github/workflows/lambda.yml index 6a07557c36..9459f8016a 100644 --- a/.github/workflows/lambda.yml +++ b/.github/workflows/lambda.yml @@ -19,7 +19,7 @@ jobs: working-directory: ./lambdas steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v3.2.0 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Install dependencies run: yarn install --frozen-lockfile - name: Run prettier @@ -32,7 +32,7 @@ jobs: - name: Build distribution run: yarn build - name: Upload coverage report - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v31.2 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 if: ${{ failure() }} with: name: coverage-reports diff --git a/.github/workflows/packer-build.yml b/.github/workflows/packer-build.yml index d3c3be5be0..75fedabbb2 100644 --- a/.github/workflows/packer-build.yml +++ b/.github/workflows/packer-build.yml @@ -16,7 +16,7 @@ jobs: name: Verify packer runs-on: ubuntu-latest container: - image: index.docker.io/hashicorp/packer@sha256:297bbbbbbf3ce9e0431ac1e8f02934b20e1197613f877b55dfdb1ebfd94eb748 # ratchet:index.docker.io/hashicorp/packer:1.8.6 + image: index.docker.io/hashicorp/packer@sha256:12c441b8a3994e7df9f0e2692d9298f14c387e70bcc06139420977dbf80a137b # 1.11.2 strategy: matrix: image: ["linux-al2023", "windows-core-2019", "windows-core-2022", "ubuntu-focal", "ubuntu-jammy", "ubuntu-jammy-arm64"] @@ -25,7 +25,7 @@ jobs: working-directory: images/${{ matrix.image }} steps: - name: "Checkout" - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # ratchet:actions/checkout@v4 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: packer init run: packer init . - name: check packer formatting diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cc029abe2d..5b2b33f61d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,26 +17,25 @@ jobs: - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 with: node-version: 20 - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # ratchet:actions/checkout@v4 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Build dist working-directory: lambdas run: yarn install --frozen-lockfile && yarn run test && yarn dist - name: Get installation token - uses: philips-software/app-token-action@9f5d57062c9f2beaffafaa9a34f66f824ead63a9 # ratchet:philips-software/app-token-action@v2.0.0 + uses: actions/create-github-app-token@31c86eb3b33c9b601a1f60f98dcbfd1d70f379b4 # v1.10.3 id: token with: - app_id: ${{ secrets.FOREST_RELEASER_APP_ID }} - app_base64_private_key: ${{ secrets.FOREST_RELEASER_APP_PRIVATE_KEY_BASE64 }} - auth_type: installation + app-id: ${{ secrets.FOREST_RELEASER_APP_ID }} + private-key: ${{ secrets.FOREST_RELEASER_APP_PRIVATE_KEY }} - name: Extract branch name id: branch shell: bash run: echo "name=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT - name: Release id: release - uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # ratchet:google-github-actions/release-please-action@v3 + uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4.1.1 with: - default-branch: ${{ steps.branch.outputs.name }} + target-branch: ${{ steps.branch.outputs.name }} release-type: terraform-module token: ${{ steps.token.outputs.token }} - name: Upload Release Asset diff --git a/.github/workflows/semantic-check.yml b/.github/workflows/semantic-check.yml index a2f4637d6b..dc8adca458 100644 --- a/.github/workflows/semantic-check.yml +++ b/.github/workflows/semantic-check.yml @@ -13,8 +13,8 @@ jobs: name: Semantic Commit Message Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # ratchet:actions/checkout@v4 - - uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # ratchet:amannn/action-semantic-pull-request@v5 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3 name: Check PR for Semantic Commit Message env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 30022522ed..9e3f86ef33 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -10,7 +10,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # ratchet:actions/stale@v7 + - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0 with: stale-issue-message: > This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs. Thank you for your contributions. diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index b60b31b34a..dfc9587153 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -23,7 +23,7 @@ jobs: image: hashicorp/terraform:${{ matrix.terraform }} steps: - name: "Checkout" - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: "Fake zip files" # Validate will fail if it cannot find the zip files run: | touch lambdas/functions/webhook/webhook.zip @@ -89,7 +89,7 @@ jobs: container: image: hashicorp/terraform:${{ matrix.terraform }} steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: terraform init run: terraform init -get -backend=false -input=false - if: contains(matrix.terraform, '1.3.') @@ -147,7 +147,7 @@ jobs: container: image: hashicorp/terraform:${{ matrix.terraform }} steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: terraform init run: terraform init -get -backend=false -input=false - if: contains(matrix.terraform, '1.5.') diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index debc7215c7..2f367d9697 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -12,37 +12,28 @@ permissions: jobs: docs: - # update docs after merge back to develop name: Auto update terraform docs runs-on: ubuntu-latest steps: - - uses: philips-software/app-token-action@9f5d57062c9f2beaffafaa9a34f66f824ead63a9 # v2.0.0 - id: app - with: - app_id: ${{ vars.FOREST_PR_BOT_APP_ID }} - app_base64_private_key: ${{ secrets.FOREST_PR_BOT_APP_KEY_BASE64 }} - auth_type: installation - org: philips-labs - - name: Checkout with GITHUB Action token - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # ratchet:actions/checkout@v4 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: - token: ${{ steps.app.outputs.token }} + token: ${{ secrets.GITHUB_TOKEN }} # use an app to ensure CI is triggered - name: Generate TF docs if: github.repository_owner == 'philips-labs' - uses: terraform-docs/gh-actions@e47bfa196e79fa50987ef391be236d9d97b0c786 # ratchet:terraform-docs/gh-actions@v1.2.0 + uses: terraform-docs/gh-actions@e47bfa196e79fa50987ef391be236d9d97b0c786 # v1.2.0 with: find-dir: . git-commit-message: "docs: auto update terraform docs" git-push: ${{ github.ref != 'refs/heads/main' || github.repository_owner != 'philips-labs' }} - git-push-user-name: forest-pr|bot - git-push-user-email: "forest-pr[bot]@users.noreply.github.com" + git-push-user-name: philips-labs-pr|bot + git-push-user-email: "philips-labs-pr[bot]@users.noreply.github.com" - name: Generate TF docs (forks) if: github.repository_owner != 'philips-labs' - uses: terraform-docs/gh-actions@e47bfa196e79fa50987ef391be236d9d97b0c786 # ratchet:terraform-docs/gh-actions@v1.2.0 + uses: terraform-docs/gh-actions@e47bfa196e79fa50987ef391be236d9d97b0c786 # v1.2.0 with: find-dir: . git-commit-message: "docs: auto update terraform docs" @@ -51,7 +42,7 @@ jobs: # change docs via PR in case of locked main branch - name: Create Pull Request (main branch only) if: github.ref == 'refs/heads/main' && github.repository_owner == 'philips-labs' - uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # ratchet:peter-evans/create-pull-request@v6.1.0 + uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: "docs: auto update terraform docs" @@ -65,16 +56,16 @@ jobs: needs: [docs] runs-on: ubuntu-latest steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # ratchet:actions/checkout@v4 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Configure Git Credentials run: | git config user.name github-actions[bot] git config --global user.email "github-actions[bot]@users.noreply.github.com" - - uses: actions/setup-python@v5 + - uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 with: python-version: 3.x - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - - uses: actions/cache@v4 + - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: key: mkdocs-material-${{ env.cache_id }} path: .cache