From a4b6c14ed13e6fa41044bd3c6b88eee420dc0042 Mon Sep 17 00:00:00 2001 From: Maciej Barelkowski Date: Thu, 31 Oct 2024 14:04:39 +0100 Subject: [PATCH] ci: establish snake_case convention for jobs --- .github/workflows/ADD_TO_PROJECT.yml | 2 +- .github/workflows/ASSIGN_MILESTONE.yml | 10 +++---- .github/workflows/BUILD_ON_DEMAND.yml | 2 +- .github/workflows/CI.yml | 2 +- .github/workflows/CODE_SCANNING.yml | 4 ++- .github/workflows/COMMENT_DEVELOP_FIX.yml | 3 ++- .github/workflows/CREATE_MILESTONE.yml | 2 +- .github/workflows/MERGE_MAIN_TO_DEVELOP.yml | 7 ++--- .github/workflows/NEW_ALPHA_ISSUE.yml | 3 ++- .github/workflows/NEW_MAJOR_ISSUE.yml | 3 ++- .github/workflows/NIGHTLY.yml | 8 +++--- .github/workflows/PUBLISH_RELEASE.yml | 7 ++--- .github/workflows/RELEASE.yml | 13 +++++---- .github/workflows/RELEASE_ISSUE.yml | 30 +++++++++++---------- 14 files changed, 55 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ADD_TO_PROJECT.yml b/.github/workflows/ADD_TO_PROJECT.yml index 67bb3d30c4..3980d65b1a 100644 --- a/.github/workflows/ADD_TO_PROJECT.yml +++ b/.github/workflows/ADD_TO_PROJECT.yml @@ -12,7 +12,7 @@ on: - labeled jobs: - Exec: + exec: name: Add issue to project if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }} runs-on: ubuntu-latest diff --git a/.github/workflows/ASSIGN_MILESTONE.yml b/.github/workflows/ASSIGN_MILESTONE.yml index 04931cfd60..ec6a0951d2 100644 --- a/.github/workflows/ASSIGN_MILESTONE.yml +++ b/.github/workflows/ASSIGN_MILESTONE.yml @@ -7,7 +7,7 @@ on: types: ['closed'] jobs: - check-permissions: + check_permissions: runs-on: ubuntu-latest name: Check Repo Permission outputs: @@ -24,13 +24,13 @@ jobs: --jq '.permission') echo "PERMISSION=$PERMISSION" >> $GITHUB_OUTPUT - assign-milestone: + assign_milestone: runs-on: ubuntu-latest name: Assign Milestone - needs: check-permissions + needs: check_permissions if: | - needs.check-permissions.outputs.permission == 'admin' || - needs.check-permissions.outputs.permission == 'write' + needs.check_permissions.outputs.permission == 'admin' || + needs.check_permissions.outputs.permission == 'write' steps: - name: Get current Milestone id: getMilestone diff --git a/.github/workflows/BUILD_ON_DEMAND.yml b/.github/workflows/BUILD_ON_DEMAND.yml index 2114b64ca3..12e85f84a9 100644 --- a/.github/workflows/BUILD_ON_DEMAND.yml +++ b/.github/workflows/BUILD_ON_DEMAND.yml @@ -9,7 +9,7 @@ on: description: 'Dependencies to link from GitHub (format: bpmn-js#develop,dmn-js#9.0.0)' default: '' jobs: - Build: + build: strategy: matrix: os: [ ubuntu-latest, macos-latest, windows-2022 ] diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 895996110b..8584550de9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,7 +1,7 @@ name: CI on: [ push, pull_request ] jobs: - Build: + build: strategy: fail-fast: false matrix: diff --git a/.github/workflows/CODE_SCANNING.yml b/.github/workflows/CODE_SCANNING.yml index 98d1f5137a..0ca397d8bb 100644 --- a/.github/workflows/CODE_SCANNING.yml +++ b/.github/workflows/CODE_SCANNING.yml @@ -10,7 +10,9 @@ on: - '**/*.md' jobs: - CodeQL-Build: + codeql_build: + name: Scan with CodeQL + # CodeQL runs on ubuntu-latest, windows-latest, and macos-latest runs-on: ubuntu-latest diff --git a/.github/workflows/COMMENT_DEVELOP_FIX.yml b/.github/workflows/COMMENT_DEVELOP_FIX.yml index 1a4fd757bc..eac9b170a7 100644 --- a/.github/workflows/COMMENT_DEVELOP_FIX.yml +++ b/.github/workflows/COMMENT_DEVELOP_FIX.yml @@ -8,7 +8,8 @@ on: permissions: pull-requests: write jobs: - comment-on-fix-to-develop: + comment: + name: Comment on fix to develop runs-on: ubuntu-latest steps: - name: Check for fix commits diff --git a/.github/workflows/CREATE_MILESTONE.yml b/.github/workflows/CREATE_MILESTONE.yml index 78988e7beb..442548fb1a 100644 --- a/.github/workflows/CREATE_MILESTONE.yml +++ b/.github/workflows/CREATE_MILESTONE.yml @@ -5,7 +5,7 @@ on: types: ['closed'] jobs: - create-milestone: + create_milestone: runs-on: ubuntu-latest name: Create new Milestone if: startsWith(github.event.milestone.title, 'M') diff --git a/.github/workflows/MERGE_MAIN_TO_DEVELOP.yml b/.github/workflows/MERGE_MAIN_TO_DEVELOP.yml index da5fe26c65..6d4ea35c67 100644 --- a/.github/workflows/MERGE_MAIN_TO_DEVELOP.yml +++ b/.github/workflows/MERGE_MAIN_TO_DEVELOP.yml @@ -5,7 +5,7 @@ on: - "main" jobs: - Merge_main_to_develop: + merge_main_to_develop: runs-on: ubuntu-latest permissions: contents: write @@ -23,8 +23,9 @@ jobs: git merge -m 'chore: merge main to develop' --no-edit origin/main git push - Post-Failure: - needs: Merge_main_to_develop + post_failure: + name: Notify failure + needs: merge_main_to_develop if: failure() runs-on: ubuntu-latest steps: diff --git a/.github/workflows/NEW_ALPHA_ISSUE.yml b/.github/workflows/NEW_ALPHA_ISSUE.yml index 0afef502ed..0214016b72 100644 --- a/.github/workflows/NEW_ALPHA_ISSUE.yml +++ b/.github/workflows/NEW_ALPHA_ISSUE.yml @@ -4,7 +4,8 @@ on: # After the April and October releases - cron: '0 8 15 APR,OCT *' jobs: - createIssue: + create_issue: + name: Create issue runs-on: ubuntu-latest steps: - run: gh issue create --title "$ISSUE_TITLE" --body "$ISSUE_BODY" --label "ready" --repo $GITHUB_REPOSITORY diff --git a/.github/workflows/NEW_MAJOR_ISSUE.yml b/.github/workflows/NEW_MAJOR_ISSUE.yml index 06def514c3..5f032e93dc 100644 --- a/.github/workflows/NEW_MAJOR_ISSUE.yml +++ b/.github/workflows/NEW_MAJOR_ISSUE.yml @@ -4,7 +4,8 @@ on: # Before the April and October releases - cron: '0 8 15 MAR,SEP *' jobs: - createIssue: + create_issue: + name: Create issue runs-on: ubuntu-latest steps: - run: gh issue create --title "$ISSUE_TITLE" --body "$ISSUE_BODY" --label "ready" --repo $GITHUB_REPOSITORY diff --git a/.github/workflows/NIGHTLY.yml b/.github/workflows/NIGHTLY.yml index 3375f6307f..b2eec7a239 100644 --- a/.github/workflows/NIGHTLY.yml +++ b/.github/workflows/NIGHTLY.yml @@ -3,7 +3,8 @@ on: schedule: - cron: '0 18 * * *' jobs: - Build_nightly: + build_nightly: + name: Build nightly strategy: matrix: include: @@ -102,8 +103,9 @@ jobs: artifact_subpath: 'nightly' artifact_file: "${{ join(matrix.files, ' ') }}" - Post-Failure: - needs: Build_nightly + post_failure: + name: Notify failure + needs: build_nightly if: failure() runs-on: ubuntu-latest steps: diff --git a/.github/workflows/PUBLISH_RELEASE.yml b/.github/workflows/PUBLISH_RELEASE.yml index 09c65f2a8f..02d0585066 100644 --- a/.github/workflows/PUBLISH_RELEASE.yml +++ b/.github/workflows/PUBLISH_RELEASE.yml @@ -4,7 +4,7 @@ on: types: - released jobs: - Publish: + publish: runs-on: ubuntu-latest steps: @@ -37,8 +37,9 @@ jobs: version: ${{ steps.retrieveVersion.outputs.version }} artifact_file: 'artifacts/*' - Post-Failure: - needs: Publish + post_failure: + name: Notify failure + needs: publish if: failure() runs-on: ubuntu-latest steps: diff --git a/.github/workflows/RELEASE.yml b/.github/workflows/RELEASE.yml index e95e51e3c7..7796476e94 100644 --- a/.github/workflows/RELEASE.yml +++ b/.github/workflows/RELEASE.yml @@ -4,7 +4,8 @@ on: tags: - 'v*' jobs: - Pre_release: + pre_release: + name: Prepare release runs-on: ubuntu-latest permissions: contents: write @@ -18,8 +19,9 @@ jobs: TAG=$(git describe --tags --abbrev=0) gh release create $TAG --draft --title $TAG - Build_release: - needs: Pre_release + build_release: + name: Build release + needs: pre_release strategy: matrix: os: [ ubuntu-latest, macos-latest, windows-2022 ] @@ -102,8 +104,9 @@ jobs: NODE_ENV: "production" run: npm run build -- --win --publish - Post_release: - needs: Build_release + post_release: + name: Post release + needs: build_release runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/RELEASE_ISSUE.yml b/.github/workflows/RELEASE_ISSUE.yml index 53fbc900de..bc78192dbe 100644 --- a/.github/workflows/RELEASE_ISSUE.yml +++ b/.github/workflows/RELEASE_ISSUE.yml @@ -3,24 +3,25 @@ on: issues: types: [closed, assigned] jobs: - createReleaseIssue: + create_release_issue: runs-on: ubuntu-latest name: Create new Release Issue if: | contains(github.event.issue.labels.*.name, 'release') && github.event.action == 'closed' outputs: - assignee: ${{ steps.createReleaseIssue.outputs.assignee }} + assignee: ${{ steps.create_release_issue.outputs.assignee }} steps: - - id: createReleaseIssue + - id: create_release_issue name: Create new Release Issue uses: bpmn-io/actions/release-issue@latest with: template-path: 'docs/.project/RELEASE_TEMPLATE.md' package-path: 'app/package.json' - assignMilestone: - needs: createReleaseIssue + assign_milestone: + name: Assign milestone + needs: create_release_issue if: github.event.issue.milestone runs-on: ubuntu-latest name: Assign Milestone @@ -45,16 +46,16 @@ jobs: gh api \ --method PATCH \ -H "Accept: application/vnd.github+json" \ - /repos/${{ github.repository }}/issues/${{ fromJson(needs.createReleaseIssue.outputs.issue).number }} \ + /repos/${{ github.repository }}/issues/${{ fromJson(needs.create_release_issue.outputs.issue).number }} \ -F "milestone=${{steps.getMilestone.outputs.MILESTONE_NUMBER}}" - updateSlackRole: + update_slack_role: + name: Sync Slack roles + needs: create_release_issue runs-on: ubuntu-latest if: | always() && contains(github.event.issue.labels.*.name, 'release') - name: Sync Slack roles - needs: createReleaseIssue steps: - name: Import Secrets id: secrets @@ -74,12 +75,13 @@ jobs: SLACK_BOT_TOKEN: ${{ steps.secrets.outputs.SLACK_BOT_TOKEN }} GROUP_ID: ${{ steps.secrets.outputs.RELEASE_MANAGER_GROUP_ID }} # User ID is either the assignee from the newly created issue or the new assigned from the `assigned` trigger - USER_ID: ${{ fromJSON(steps.secrets.outputs.TEAM_MEMBER_IDS)[ needs.createReleaseIssue.outputs.assignee || github.event.issue.assignee.login ] }} + USER_ID: ${{ fromJSON(steps.secrets.outputs.TEAM_MEMBER_IDS)[ needs.create_release_issue.outputs.assignee || github.event.issue.assignee.login ] }} run: | curl --fail-with-body -X POST -H "application/x-www-form-urlencoded" -d "token=${SLACK_BOT_TOKEN}&usergroup=${GROUP_ID}&users=${USER_ID}" https://slack.com/api/usergroups.users.update - notifyOnSlack: - needs: createReleaseIssue + notify_on_slack: + name: Notify new release manager on Slack + needs: create_release_issue if: | always() && contains(github.event.issue.labels.*.name, 'release') @@ -105,5 +107,5 @@ jobs: env: SLACK_BOT_TOKEN: ${{ steps.secrets.outputs.SLACK_BOT_TOKEN }} # Release manager is either the assignee from the newly created issue or the new assigned from the `assigned` trigger - RELEASE_MANAGER: ${{ needs.createReleaseIssue.outputs.assignee || github.event.issue.assignee.login }} - ISSUE_LINK: https://github.com/${{ github.repository }}/issues/${{ fromJson(needs.createReleaseIssue.outputs.issue).number }} + RELEASE_MANAGER: ${{ needs.create_release_issue.outputs.assignee || github.event.issue.assignee.login }} + ISSUE_LINK: https://github.com/${{ github.repository }}/issues/${{ fromJson(needs.create_release_issue.outputs.issue).number }}