This repository has been archived by the owner on Mar 26, 2024. It is now read-only.
github-actions #376
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: github-actions | |
"on": | |
pull_request: | |
branches: | |
- main | |
merge_group: | |
types: | |
- checks_requested | |
env: | |
CARGO_TERM_COLOR: always | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
changes: | |
name: detect file changes | |
permissions: | |
pull-requests: read | |
runs-on: ubuntu-latest | |
outputs: | |
github-actions: ${{ steps.filter.outputs.github-actions }} | |
github-actions_files: ${{ steps.filter.outputs.github-actions_files }} | |
markdown: ${{ steps.filter.outputs.markdown }} | |
markdown_files: ${{ steps.filter.outputs.markdown_files }} | |
rust: ${{ steps.filter.outputs.rust }} | |
rust_files: ${{ steps.filter.outputs.rust_files }} | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | |
with: | |
fetch-depth: 20 | |
- name: Filter changed repository files | |
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 | |
id: filter | |
with: | |
list-files: shell | |
filters: | | |
github-actions: | |
- .github/**/*.yml | |
markdown: | |
- added|modified: '**/*.md' | |
rust: | |
- '**/*.rs' | |
- '**/Cargo.*' | |
- .github/workflows/rust.yml | |
workflows_lint: | |
name: workflows / lint | |
needs: | |
- changes | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | |
- name: Check lints | |
uses: raven-actions/actionlint@d6c9e3222b489401880e866bc6715049773b63a3 | |
with: | |
group-result: false | |
merge_queue: | |
name: github-actions workflow ready | |
needs: | |
- changes | |
- workflows_lint | |
runs-on: ubuntu-latest | |
if: always() | |
steps: | |
- name: "Check status of job_id: changes" | |
run: |- | |
RESULT="${{ needs.changes.result }}"; | |
if [[ $RESULT == "success" || $RESULT == "skipped" ]]; then | |
exit 0 | |
else | |
echo "***" | |
echo "Error: The required job did not pass." | |
exit 1 | |
fi | |
- name: "Check status of job_id: workflows_lint" | |
run: |- | |
RESULT="${{ needs.workflows_lint.result }}"; | |
if [[ $RESULT == "success" || $RESULT == "skipped" ]]; then | |
exit 0 | |
else | |
echo "***" | |
echo "Error: The required job did not pass." | |
exit 1 | |
fi |