Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(triage): adjust triage to build object for project workflow usage #22

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/project.yaml
Original file line number Diff line number Diff line change
@@ -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 changes: 38 additions & 6 deletions .github/workflows/triage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,43 @@ on:
jobs:



project:
name: Project
uses: nofusscomputing/action_project/.github/workflows/project.yaml@development
with:
PROJECT_URL: https://github.com/orgs/nofusscomputing/projects/3
secrets:
WORKFLOW_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
name: Fetch Triage Details
runs-on: ubuntu-latest
steps:

- name: Collect Triage Details
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

Loading