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:
Tonye Jack
2024-01-13 01:48:42 -07:00
committed by GitHub
parent a57f4dcc81
commit 0ca1c07b47
7 changed files with 79 additions and 13 deletions

View File

@@ -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 }}'

View File

@@ -1,4 +1,4 @@
name: Workflow Run Exmaple
name: Workflow Run Example
on:
workflow_run:
workflows: [Matrix Test]