feat: add support for forcing the use of GitHub’s REST API (#1849)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
29
.github/workflows/multi-job-test.yml
vendored
29
.github/workflows/multi-job-test.yml
vendored
@@ -36,3 +36,32 @@ jobs:
|
||||
- name: List all changed files
|
||||
run: |
|
||||
echo '${{ needs.changed-files.outputs.all_changed_files }}'
|
||||
|
||||
|
||||
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 }}'
|
||||
|
||||
2
.github/workflows/workflow-run-test.yml
vendored
2
.github/workflows/workflow-run-test.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Workflow Run Exmaple
|
||||
name: Workflow Run Example
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [Matrix Test]
|
||||
|
||||
Reference in New Issue
Block a user