1 name: FIPS Changed Label
4 workflows: ["FIPS Checksums"]
10 runs-on: ubuntu-latest
11 if: ${{ github.event.workflow_run.event == 'pull_request' }}
13 - name: 'Check artifact and apply'
14 if: ${{ github.event.workflow_run.conclusion == 'success' }}
15 uses: actions/github-script@v4
17 github-token: ${{secrets.GITHUB_TOKEN}}
19 var artifacts = await github.actions.listWorkflowRunArtifacts({
20 owner: context.repo.owner,
21 repo: context.repo.repo,
22 run_id: ${{ github.event.workflow_run.id }},
24 if ( artifacts.data.artifacts[0].name == 'fips_changed' ) {
25 github.issues.addLabels({
26 issue_number: ${{ github.event.workflow_run.pull_requests[0].number }},
27 owner: context.repo.owner,
28 repo: context.repo.repo,
29 labels: ['severity: fips change']
31 } else if ( artifacts.data.artifacts[0].name == 'fips_unchanged' ) {
32 var labels = await github.issues.listLabelsOnIssue({
33 issue_number: ${{ github.event.workflow_run.pull_requests[0].number }},
34 owner: context.repo.owner,
35 repo: context.repo.repo,
38 for ( var label in labels.data ) {
39 if (labels.data[label].name == 'severity: fips change') {
40 github.issues.removeLabel({
41 issue_number: ${{ github.event.workflow_run.pull_requests[0].number }},
42 owner: context.repo.owner,
43 repo: context.repo.repo,
44 name: 'severity: fips change'