chore: run jobs if and only if the upstream workflow completed with success #1208
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: Compose module pipeline | |
on: | |
workflow_run: | |
workflows: [Main pipeline] | |
types: | |
- completed | |
push: | |
paths-ignore: | |
- 'mkdocs.yml' | |
- 'docs/**' | |
- 'README.md' | |
pull_request: | |
paths-ignore: | |
- 'mkdocs.yml' | |
- 'docs/**' | |
- 'README.md' | |
jobs: | |
test-compose: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
strategy: | |
matrix: | |
go-version: [1.19.x, 1.x] | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: modVerify | |
working-directory: ./modules/compose | |
run: go mod verify | |
- name: modTidy | |
working-directory: ./modules/compose | |
run: go mod tidy | |
- name: gotestsum | |
working-directory: ./modules/compose | |
run: | | |
go run gotest.tools/gotestsum \ | |
--format short-verbose \ | |
--rerun-fails=5 \ | |
--packages="./..." \ | |
--junitfile TEST-compose.xml | |
- name: Run checker | |
run: | | |
./scripts/check_environment.sh | |
- name: Test Summary | |
uses: test-summary/action@4ee9ece4bca777a38f05c8fc578ac2007fe266f7 | |
with: | |
paths: "**/TEST-compose*.xml" | |
if: always() |