fix(deps): bump actions/cache action to v4.0.2 #1045
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
name: Test | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
workflow_call: | |
inputs: | |
bump: | |
description: > | |
If true, run the Commitizen action on push to main to commit a version | |
bump and tag a release if there are any release-worthy changes. Uses | |
your GITHUB_TOKEN, which must have write access to your repository. | |
required: false | |
default: true | |
type: boolean | |
secrets: | |
SLACK_BOT_TOKEN: | |
description: > | |
The Slack API bot token for your custom app. It will be used to report | |
the result of the workflow. The token must have the chat:write scope. | |
required: true | |
SLACK_ACTIONS_CHANNEL_ID: | |
description: > | |
The ID of the Slack channel to report the workflow result to. Your bot | |
should be a member. Secondary-click on the channel in Slack, and | |
select "Copy link" to copy a URL containing the channel ID. | |
required: true | |
permissions: | |
contents: write # for pre-commit-action | |
pull-requests: read # for slack-templates in private repositories | |
jobs: | |
test: | |
name: Run Pre-commit Hooks | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository. | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
- name: Install and run pre-commit hooks (self-test). | |
if: github.repository == 'ScribeMD/pre-commit-action' | |
uses: ./ | |
- name: Install and run pre-commit hooks (called workflow). | |
if: github.repository != 'ScribeMD/pre-commit-action' | |
uses: ScribeMD/pre-commit-action@main | |
with: | |
bump: ${{ inputs.bump }} | |
- name: Send Slack notification with job status. | |
if: always() | |
uses: ScribeMD/slack-templates@bea126c3915616204196f29d27d6ab9526d61a25 # 0.6.37 | |
with: | |
bot-token: ${{ secrets.SLACK_BOT_TOKEN }} | |
channel-id: ${{ secrets.SLACK_ACTIONS_CHANNEL_ID }} | |
template: result |