ci(triage): adjust triage to build object for project workflow usage
https://github.com/nofusscomputing/action_project/issues/3 https://github.com/nofusscomputing/action_project/pull/4
This commit is contained in:
57
.github/workflows/project.yaml
vendored
Normal file
57
.github/workflows/project.yaml
vendored
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
name: 'Project'
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows:
|
||||||
|
- 'Triage'
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
actions: read
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
prepare-project-triage:
|
||||||
|
name: Project Triage
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
triage_event_name: ${{ steps.triage-output.outputs.triage_event_name }}
|
||||||
|
triage_event_action: ${{ steps.triage-output.outputs.triage_event_action }}
|
||||||
|
triage_item_number: ${{ steps.triage-output.outputs.triage_item_number }}
|
||||||
|
triage_item_url: ${{ steps.triage-output.outputs.triage_item_url }}
|
||||||
|
steps:
|
||||||
|
|
||||||
|
## Additional Steps
|
||||||
|
|
||||||
|
- name: Fetch triage Details
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: triage-details-project
|
||||||
|
run-id: ${{ github.event.workflow_run.id }}
|
||||||
|
|
||||||
|
|
||||||
|
- name: Set Outputs
|
||||||
|
id: triage-output
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cat triage_details-project.txt > $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
|
||||||
|
project:
|
||||||
|
name: Project
|
||||||
|
needs:
|
||||||
|
- prepare-project-triage
|
||||||
|
uses: nofusscomputing/action_project/.github/workflows/project.yaml@development
|
||||||
|
with:
|
||||||
|
PROJECT_URL: https://github.com/orgs/nofusscomputing/projects/3
|
||||||
|
TRIAGE_EVENT_NAME: ${{ needs.prepare-project-triage.outputs.triage_event_name }}
|
||||||
|
TRIAGE_EVENT_ACTION: ${{ needs.prepare-project-triage.outputs.triage_event_action }}
|
||||||
|
TRIAGE_ITEM_NUMBER: ${{ needs.prepare-project-triage.outputs.triage_item_number }}
|
||||||
|
TRIAGE_ITEM_URL: ${{ needs.prepare-project-triage.outputs.triage_item_url }}
|
||||||
|
secrets:
|
||||||
|
WORKFLOW_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
|
44
.github/workflows/triage.yaml
vendored
44
.github/workflows/triage.yaml
vendored
@ -27,11 +27,43 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
project:
|
project:
|
||||||
name: Project
|
name: Fetch Triage Details
|
||||||
uses: nofusscomputing/action_project/.github/workflows/project.yaml@development
|
runs-on: ubuntu-latest
|
||||||
with:
|
steps:
|
||||||
PROJECT_URL: https://github.com/orgs/nofusscomputing/projects/3
|
|
||||||
secrets:
|
- name: Collect Triage Details
|
||||||
WORKFLOW_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "triage_event_name=${{ github.event_name }}" > triage_details-project.txt;
|
||||||
|
echo "triage_event_action=${{ github.event.action }}" >> triage_details-project.txt;
|
||||||
|
|
||||||
|
if [ "${{ github.event_name }}" == 'pull_request' ]; then
|
||||||
|
|
||||||
|
echo "triage_item_number=${{ github.event.pull_request.number }}" >> triage_details-project.txt;
|
||||||
|
|
||||||
|
echo "triage_item_url=https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}" >> triage_details-project.txt;
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
echo "triage_item_number=${{ github.event.issue.number }}" >> triage_details-project.txt;
|
||||||
|
|
||||||
|
echo "triage_item_url=https://github.com/${{ github.repository }}/issues/${{ github.event.issue.number }}" >> triage_details-project.txt;
|
||||||
|
|
||||||
|
fi;
|
||||||
|
|
||||||
|
|
||||||
|
echo "[Debug]************************************";
|
||||||
|
|
||||||
|
cat triage_details-project.txt;
|
||||||
|
|
||||||
|
echo "[Debug]************************************";
|
||||||
|
|
||||||
|
|
||||||
|
- name: Upload Triage Data
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: triage-details-project
|
||||||
|
path: triage_details-project.txt
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user