deps(github-actions): DSW-000: Bump actions/upload-artifact from 4.4.3 to 4.5.0 in /.github/workflows #580
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: Labeler - Get PR labels | |
on: pull_request | |
jobs: | |
get-missing-labels: # Fetch labels that might need to be created, store in an artifact | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Fetch branches # This is necessary for comparing the current branch changes against main | |
env: | |
BRANCH_NAME: ${{github.head_ref}} | |
run: | | |
git fetch origin main:main | |
git fetch origin "$BRANCH_NAME":refs/remotes/origin/"$BRANCH_NAME" | |
git checkout -b "$BRANCH_NAME" origin/"$BRANCH_NAME" | |
- name: Get Missing Labels | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
env: | |
PR_NUMBER: ${{ github.event.pull_request.number }} | |
PR_BRANCH_NAME: ${{ github.event.pull_request.head.ref }} | |
with: | |
script: | | |
const { PR_BRANCH_NAME, PR_NUMBER } = process.env; | |
const script = require('./packages/tools/pie-monorepo-utils/pr-labeler/get-labels.js'); | |
const config = { | |
prBranchName: PR_BRANCH_NAME, | |
prNumber: PR_NUMBER, | |
artifactFilePath: './tmp-labels.json' | |
} | |
await script(config); | |
- name: Upload artifact | |
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 | |
with: | |
path: ./tmp-labels.json | |
name: tmp-labels.json | |
retention-days: 1 |