2024-01-12 17:43:51 +00:00
|
|
|
name: Multi Job Test
|
|
|
|
|
2024-01-13 07:31:45 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2024-01-12 17:43:51 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- "**"
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- "**"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
changed-files:
|
|
|
|
name: Get changed files
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Get changed files
|
|
|
|
id: changed-files
|
|
|
|
uses: ./
|
|
|
|
- name: List all changed files
|
|
|
|
run: echo '${{ steps.changed-files.outputs.all_changed_files }}'
|
|
|
|
|
|
|
|
view-changed-files:
|
|
|
|
name: View all changed files
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [changed-files]
|
|
|
|
steps:
|
|
|
|
- name: List all changed files
|
|
|
|
run: |
|
|
|
|
echo '${{ needs.changed-files.outputs.all_changed_files }}'
|
2024-01-13 08:48:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
changed-files-rest-api:
|
|
|
|
name: Get changed files using REST API
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Get changed files
|
|
|
|
id: changed-files
|
|
|
|
continue-on-error: ${{ github.event_name == 'push' }}
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
use_rest_api: true
|
|
|
|
- name: List all changed files
|
|
|
|
run: echo '${{ steps.changed-files.outputs.all_changed_files }}'
|
|
|
|
|
|
|
|
view-changed-files-rest-api:
|
|
|
|
name: View all changed files using REST API
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [changed-files-rest-api]
|
|
|
|
steps:
|
|
|
|
- name: List all changed files
|
|
|
|
run: |
|
|
|
|
echo '${{ needs.changed-files-rest-api.outputs.all_changed_files }}'
|