Workflow caches warmup #4
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: Workflow caches warmup | |
on: | |
workflow_dispatch: | |
inputs: | |
reason: | |
description: The reason for dispatching it manually. | |
type: string | |
default: manual healthcheck | |
required: true | |
workflow_run: | |
workflows: [ Workflow caches cleanup ] | |
types: [ completed ] | |
jobs: | |
deps: | |
name: Caching deps | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
go: | |
- 1.x | |
- 1.20.x | |
- 1.21.x | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
with: { fetch-depth: 0 } | |
- name: Set up Go environment | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go }} | |
check-latest: true | |
- name: Install dependencies | |
run: make env deps | |
tools: | |
name: Caching tools | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
with: { fetch-depth: 0 } | |
- name: Set up Go environment | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21.x | |
cache-dependency-path: tools/go.sum | |
check-latest: true | |
- name: Install dependencies | |
run: make env tools | |
notify: | |
name: Notifying | |
needs: [ deps, tools ] | |
runs-on: ubuntu-latest | |
if: failure() || success() | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
with: { fetch-depth: 0 } | |
- name: Send notification | |
uses: ./.github/actions/notify | |
with: | |
emoji: ♻️ | |
channel: ${{ secrets.SLACK_WEBHOOK }} | |
success: ${{ ! contains(needs.*.result, 'failure') }} |