Add workflow to forward instructions #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Foo | |
on: | |
pull_request: | |
branches: [ main ] | |
env: | |
GH_API_LABELS: ${{ github.event.pull_request.issue_url }}/labels | |
GH_API_COMMENTS: ${{ github.event.pull_request.comments_url }} | |
jobs: | |
share_instruction: | |
runs-on: ubuntu-latest | |
steps: | |
# - name: Forward instruction to delete the label to privileged workflow | |
# run: | | |
# mkdir -p ./forward | |
# jq -n \ | |
# --arg instruction "delete_label" \ | |
# --arg endpoint "$GH_API_LABELS" \ | |
# '{instruction: $instruction, endpoint: $endpoint}' > ./forward/instruction.json | |
- name: Forward instruction to commen on PR to privileged workflow | |
run: | | |
mkdir -p ./forward | |
jq -n \ | |
--arg instruction "comment" \ | |
--arg endpoint "$GH_API_COMMENTS" \ | |
--arg artifacts_url "foooo.com" \ | |
--arg hash "123456789" \ | |
'{instruction: $instruction, endpoint: $endpoint, artifacts_url: $artifacts_url, hash: $hash}' > ./forward/instruction.json | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: forwarded_instructions | |
path: forward/ |