From c4329ac4d2bbd50e2afd0a657acddfeda87df5cb Mon Sep 17 00:00:00 2001 From: Snailedlt <43886029+Snailedlt@users.noreply.github.com> Date: Sun, 2 Oct 2022 04:40:52 +0200 Subject: [PATCH] test --- .github/workflows/in_develop_labeler.yml | 24 +++++++++++--- .../in_develop_labeler_preflight.yml | 33 +++++++++++++++++++ 2 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/in_develop_labeler_preflight.yml diff --git a/.github/workflows/in_develop_labeler.yml b/.github/workflows/in_develop_labeler.yml index 61b7b4335..9bd96450b 100644 --- a/.github/workflows/in_develop_labeler.yml +++ b/.github/workflows/in_develop_labeler.yml @@ -1,9 +1,12 @@ name: Label Issue In Develop on: - pull_request: - types: [closed] + workflow_run: + workflows: + - Preflight - Label Issue In Develop + types: + - completed jobs: - label: + label_preflight: name: Label Issue In Develop runs-on: ubuntu-18.04 if: github.event.pull_request.merged == true @@ -19,9 +22,22 @@ jobs: run: | python -m pip install --upgrade pip pip install -r ./.github/scripts/requirements.txt + + - name: Download workflow artifact + uses: dawidd6/action-download-artifact@v2.11.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + workflow: peek_icons.yml + run_id: ${{ github.event.workflow_run.id }} + + - name: Read the pr_num file + id: pr_num_reader + uses: juliangruber/read-file-action@v1.0.0 + with: + path: ./pr_num/pr_num.txt - name: Run in_develop_labeler.py env: TOKEN: ${{ secrets.GITHUB_TOKEN }} - BODY: ${{ github.event.pull_request.body }} + BODY: ${{ steps.pr_num_reader.outputs.content.body }} run: python ./.github/scripts/in_develop_labeler.py $TOKEN "$BODY" diff --git a/.github/workflows/in_develop_labeler_preflight.yml b/.github/workflows/in_develop_labeler_preflight.yml new file mode 100644 index 000000000..e74cb278d --- /dev/null +++ b/.github/workflows/in_develop_labeler_preflight.yml @@ -0,0 +1,33 @@ +name: Preflight - Label Issue In Develop +on: + pull_request: + types: [closed] +jobs: + label_preflight: + name: Preflight - Label Issue In Develop + runs-on: ubuntu-18.04 + if: github.event.pull_request.merged == true + steps: + - uses: actions/checkout@v2 + + - name: Setup Python v3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r ./.github/scripts/requirements.txt + + - name: Save the PR number in an artifact + shell: bash + env: + PR_NUM: ${{ github.event.number }} + run: echo $PR_NUM > pr_num.txt + + - name: Upload the PR number + uses: actions/upload-artifact@v2.2.4 + with: + name: pr_num + path: ./pr_num.txt