Bump smartcontractkit/push-gha-metrics-action from 2.1.0 to 3.0.0 #2038
Workflow file for this run
This file contains 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
# | |
# This action checks PRs to see if any changeset files were added in the PR core files were changed. | |
# If none were, it will add a comment in the PR to run changeset command to generate a changeset file. | |
# | |
name: Changeset | |
on: pull_request | |
jobs: | |
changeset: | |
# For security reasons, GITHUB_TOKEN is read-only on forks, so we cannot leave comments on PRs. | |
# This check skips the job if it is detected we are running on a fork. | |
if: ${{ github.event.pull_request.head.repo.full_name == 'smartcontractkit/chainlink' }} | |
name: Changeset checker | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
id: files-changed | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
predicate-quantifier: every | |
filters: | | |
shared: | |
- common/** | |
- '!common/**/*_test.go' | |
- plugins/** | |
- '!plugins/**/*_test.go' | |
core: | |
- core/** | |
- '!core/**/*_test.go' | |
- '!core/**/*.md' | |
- '!core/**/*.json' | |
- '!core/chainlink.goreleaser.Dockerfile' | |
- '!core/chainlink.Dockerfile' | |
contracts: | |
- contracts/**/*.sol | |
- '!contracts/**/*.t.sol' | |
core-changeset: | |
- added: '.changeset/**' | |
contracts-changeset: | |
- added: 'contracts/.changeset/**' | |
- name: Make a comment | |
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0 | |
if: ${{ (steps.files-changed.outputs.core == 'true' || steps.files-changed.outputs.shared == 'true') && steps.files-changed.outputs.core-changeset == 'false' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
message: "I see you updated files related to `core`. Please run `pnpm changeset` in the root directory to add a changeset." | |
reactions: eyes | |
comment_tag: changeset-core | |
- name: Make a comment | |
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0 | |
if: ${{ steps.files-changed.outputs.contracts == 'true' && steps.files-changed.outputs.contracts-changeset == 'false' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
message: | | |
I see you updated files related to `contracts`. Please run `pnpm changeset` in the `contracts` directory to add a changeset. | |
reactions: eyes | |
comment_tag: changeset-contracts | |
- name: Check for new changeset for core | |
if: ${{ (steps.files-changed.outputs.core == 'true' || steps.files-changed.outputs.shared == 'true') && steps.files-changed.outputs.core-changeset == 'false' }} | |
shell: bash | |
run: | | |
echo "Please run pnpm changeset to add a changeset for core." | |
exit 1 | |
- name: Check for new changeset for contracts | |
if: ${{ steps.files-changed.outputs.contracts == 'true' && steps.files-changed.outputs.contracts-changeset == 'false' }} | |
shell: bash | |
run: | | |
echo "Please run pnpm changeset to add a changeset for contracts." | |
exit 1 | |
- name: Collect Metrics | |
if: always() | |
id: collect-gha-metrics | |
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 | |
with: | |
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} | |
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} | |
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} | |
this-job-name: Changeset checker | |
continue-on-error: true |