summaryrefslogtreecommitdiffstats
path: root/.github/workflows/fips-label.yml
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2021-05-17 12:20:54 +0200
committerPauli <pauli@openssl.org>2021-05-19 13:08:27 +1000
commita51ccd5be7cef0cb668a5ec98c491676db7714f4 (patch)
tree707d4f9c9398c49024d36ec9592a30089d480563 /.github/workflows/fips-label.yml
parent47c88d453eabdf169861e984a0d5400b06b6d32b (diff)
Separate FIPS checksum and labelling into different workflows
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15309)
Diffstat (limited to '.github/workflows/fips-label.yml')
-rw-r--r--.github/workflows/fips-label.yml38
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/workflows/fips-label.yml b/.github/workflows/fips-label.yml
new file mode 100644
index 0000000000..948ff10b3e
--- /dev/null
+++ b/.github/workflows/fips-label.yml
@@ -0,0 +1,38 @@
+name: FIPS Changed Label
+on:
+ workflow_run:
+ workflows: ["FIPS Checksums"]
+ types:
+ - completed
+
+jobs:
+ apply-label:
+ runs-on: ubuntu-latest
+ if: ${{ github.event.workflow_run.event == 'pull_request' }}
+ steps:
+ - name: 'Check artifact and apply'
+ if: ${{ github.event.workflow_run.conclusion == 'success' }}
+ uses: actions/github-script@v4
+ with:
+ github-token: ${{secrets.GITHUB_TOKEN}}
+ script: |
+ var artifacts = await github.actions.listWorkflowRunArtifacts({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ run_id: ${{github.event.workflow_run.id }},
+ });
+ if ( artifacts.data.artifacts[0].name == 'fips_changed' ) {
+ github.issues.addLabels({
+ issue_number: ${{ github.event.workflow_run.pull_requests[0].number }},
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ labels: ['severity: fips change']
+ });
+ } else if ( artifacts.data.artifacts[0].name == 'fips_unchanged' ) {
+ github.issues.removeLabel({
+ issue_number: ${{ github.event.workflow_run.pull_requests[0].number }},
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ name: 'severity: fips change'
+ });
+ }