mirror of
https://github.com/bitnami/minideb.git
synced 2026-06-04 10:13:55 +08:00
🔄 synced local '.github/workflows/' with remote 'workflows/' (#157)
Signed-off-by: bitnami-bot <bitnami-bot@vmware.com>
This commit is contained in:
@@ -14,7 +14,7 @@ permissions:
|
||||
pull-requests: write
|
||||
# Avoid concurrency over the same issue
|
||||
concurrency:
|
||||
group: card-movement-${{ github.event.repository.id }}-${{ github.event.issue != null && github.event.issue.number || github.event.number }}
|
||||
group: card-movement-${{ github.event.issue != null && github.event.issue.number || github.event.number }}
|
||||
jobs:
|
||||
call-move-closed-workflow:
|
||||
uses: bitnami/support/.github/workflows/item-closed.yml@main
|
||||
|
||||
@@ -16,23 +16,30 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: read
|
||||
actions: read
|
||||
outputs:
|
||||
author: ${{ steps.get-info.outputs.author }}
|
||||
actor: ${{ steps.get-info.outputs.actor }}
|
||||
labels: ${{ steps.get-info.outputs.labels }}
|
||||
resource_url: ${{ steps.get-info.outputs.resource_url }}
|
||||
if: {{ github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
- id: get-info
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
run: |
|
||||
actor="${{ github.event.workflow_run.actor.login }}"
|
||||
pull_request="$(gh api "${{ github.event.workflow_run.pull_requests[0].url }}")"
|
||||
download_url="$(gh api "${{ github.event.workflow_run.artifacts_url }}" | jq -cr '.artifacts[] | select(.name == "pull_request_number") | .archive_download_url')"
|
||||
curl -sSL -o pull_request_number.zip -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: Bearer $GITHUB_TOKEN" $download_url
|
||||
unzip pull_request_number.zip
|
||||
pull_request_number=$(cat pull_request_number)
|
||||
pull_request="$(gh api "repos/${GITHUB_REPOSITORY}/pulls/${pull_request_number}")"
|
||||
author="$(echo $pull_request | jq -cr '.user.login')"
|
||||
author_association="$(echo $pull_request | jq -cr '.author_association')"
|
||||
labels="$(echo $pull_request | jq -cr '[.labels[].name]')"
|
||||
resource_url="$(echo $pull_request | jq -cr '.html_url')"
|
||||
|
||||
echo "::notice:: Managing PR #${pull_request_number}"
|
||||
echo "actor=${actor}" >> $GITHUB_OUTPUT
|
||||
echo "author=${author}" >> $GITHUB_OUTPUT
|
||||
echo "author_association=${author_association}" >> $GITHUB_OUTPUT
|
||||
|
||||
@@ -15,6 +15,11 @@ jobs:
|
||||
# This is a dummy workflow that triggers a workflow_run
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- id:
|
||||
run: |
|
||||
echo "::notice:: Comment on PR #${{ github.event.pull_request.number }}"
|
||||
- run: |
|
||||
echo "::notice:: Comment on PR #${{ github.event.pull_request.number }}"
|
||||
echo "${{ github.event.pull_request.number }}" > pull_request_number
|
||||
- name: Upload the PR number
|
||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
|
||||
with:
|
||||
name: pull_request_number
|
||||
path: ./pull_request_number
|
||||
Reference in New Issue
Block a user