-
Notifications
You must be signed in to change notification settings - Fork 4
V4 #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V4 #127
Changes from all commits
1b0642e
3b71b75
86dfcf4
5858ee9
578161c
a92ee10
79bd7a4
f6b46fa
0d1933b
e8ef978
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,11 +5,6 @@ on: | |
| token: | ||
| description: 'GitHub token' | ||
| required: true | ||
| ## This secret 'APPROVE_README_PUSH' is not used. | ||
| ## Remove when the v3 bootstrap has been updated | ||
| APPROVE_README_PUSH: | ||
| description: 'Token to add-and-commit generated readme' | ||
| required: true | ||
| gpg_key: | ||
| description: 'GPG Private Key' | ||
| required: true | ||
|
|
@@ -25,11 +20,35 @@ on: | |
| scan_token: | ||
| description: 'Polaris token' | ||
| required: false | ||
|
|
||
| entra_username: | ||
| description: 'Entra username for authentication' | ||
| required: false | ||
| entra_password: | ||
| description: 'Entra password for authentication' | ||
| required: false | ||
| command_client_id: | ||
| description: 'Command client ID for API authentication' | ||
| required: false | ||
| command_client_secret: | ||
| description: 'Command client secret for API authentication' | ||
| required: false | ||
| inputs: | ||
| command_token_url: | ||
| type: string | ||
| description: 'URL for obtaining command tokens' | ||
| required: false | ||
| command_hostname: | ||
| type: string | ||
| description: 'Command hostname for API endpoints' | ||
| required: false | ||
| command_base_api_path: | ||
| type: string | ||
| description: 'Base API path for the Command API' | ||
| required: false | ||
|
|
||
| jobs: | ||
| call-assign-from-json-workflow: | ||
| uses: Keyfactor/actions/.github/workflows/assign-env-from-json.yml@v3 | ||
| uses: Keyfactor/actions/.github/workflows/assign-env-from-json.yml@v4 | ||
|
|
||
| call-get-primary-language: | ||
| outputs: | ||
|
|
@@ -78,91 +97,79 @@ jobs: | |
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Create an array from platform_list input # | ||
| id: vars | ||
| run: | ||
| run: | ||
| echo "platform_matrix=`cat integration-manifest.json | jq '.platform_matrix'`" | tee -a $GITHUB_OUTPUT | tee -a $GITHUB_STEP_SUMMARY | ||
|
|
||
| call-create-github-release-workflow: | ||
| uses: Keyfactor/actions/.github/workflows/github-release.yml@v3 | ||
| uses: Keyfactor/actions/.github/workflows/github-release.yml@v4 | ||
|
|
||
| call-dotnet-build-and-release-workflow: | ||
| needs: [call-get-primary-language, call-assign-from-json-workflow, call-create-github-release-workflow] | ||
| needs: [ call-get-primary-language, call-assign-from-json-workflow, call-create-github-release-workflow ] | ||
| if: needs.call-get-primary-language.outputs.primary_language == 'C#' | ||
| uses: keyfactor/actions/.github/workflows/dotnet-build-and-release.yml@v3 | ||
| uses: keyfactor/actions/.github/workflows/dotnet-build-and-release.yml@v4 | ||
| with: | ||
| release_version: ${{ needs.call-create-github-release-workflow.outputs.release_version }} | ||
| release_url: ${{ needs.call-create-github-release-workflow.outputs.release_url }} | ||
| release_dir: ${{ needs.call-assign-from-json-workflow.outputs.release_dir }} | ||
| release_project: ${{ needs.call-assign-from-json-workflow.outputs.release_project }} | ||
| integration_type: ${{ needs.call-assign-from-json-workflow.outputs.integration_type }} | ||
| secrets: | ||
| integration_type: ${{ needs.call-assign-from-json-workflow.outputs.integration_type }} | ||
| secrets: | ||
| token: ${{ secrets.token }} | ||
|
|
||
| call-go-build-and-release-workflow: | ||
| needs: [call-get-primary-language, call-assign-from-json-workflow, call-create-github-release-workflow,call-goreleaser-exists] | ||
| if: needs.call-get-primary-language.outputs.primary_language == 'Go' && needs.call-goreleaser-exists.outputs.goreleaser-exists == 'true' | ||
| uses: keyfactor/actions/.github/workflows/go-build-and-release.yml@v3 | ||
| with: | ||
| needs: [ call-get-primary-language, call-assign-from-json-workflow, call-create-github-release-workflow,call-goreleaser-exists ] | ||
| if: needs.call-get-primary-language.outputs.primary_language == 'Go' && needs.call-goreleaser-exists.outputs.goreleaser-exists == 'true' | ||
| uses: keyfactor/actions/.github/workflows/go-build-and-release.yml@v4 | ||
| with: | ||
| release_version: ${{ needs.call-create-github-release-workflow.outputs.release_version }} | ||
| secrets: | ||
| secrets: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| gpg_key: ${{ secrets.gpg_key }} | ||
| gpg_pass: ${{ secrets.gpg_pass }} | ||
|
|
||
| call-container-build-and-release-workflow: | ||
| needs: [call-get-primary-language, call-assign-from-json-workflow, call-create-github-release-workflow,call-goreleaser-exists,setup_platforms] | ||
| if: needs.call-get-primary-language.outputs.primary_language == 'Go' && needs.call-goreleaser-exists.outputs.goreleaser-exists == 'false' | ||
| uses: keyfactor/actions/.github/workflows/container-build-and-release.yml@v3 | ||
| with: | ||
| release_version: ${{ needs.call-create-github-release-workflow.outputs.release_version }} | ||
| platform_list: ${{ fromJson(needs.setup_platforms.outputs.platform_matrix) }} | ||
| secrets: | ||
| docker-user: ${{ secrets.docker-user }} | ||
| docker-token: ${{ secrets.docker-token }} | ||
|
|
||
| call-maven-build-and-release-workflow: | ||
| needs: [call-get-primary-language, call-assign-from-json-workflow, call-create-github-release-workflow] | ||
| if: needs.call-get-primary-language.outputs.primary_language == 'Java' | ||
| uses: keyfactor/actions/.github/workflows/maven-build-and-release.yml@v3 | ||
| with: | ||
| release_version: ${{ needs.call-create-github-release-workflow.outputs.release_version }} | ||
| release_url: ${{ needs.call-create-github-release-workflow.outputs.release_url }} | ||
| release_dir: ${{ needs.call-assign-from-json-workflow.outputs.release_dir }} | ||
| secrets: | ||
| token: ${{ secrets.token }} | ||
|
|
||
| call-generate-readme-workflow: | ||
| permissions: | ||
| contents: write # Explicitly grant write permission | ||
| if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | ||
| uses: Keyfactor/actions/.github/workflows/generate-readme.yml@v3 | ||
| uses: Keyfactor/actions/.github/workflows/generate-readme.yml@v4 | ||
| with: | ||
| command_token_url: ${{ vars.COMMAND_TOKEN_URL }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be |
||
| command_hostname: ${{ vars.COMMAND_HOSTNAME }} | ||
| command_base_api_path: ${{ vars.COMMAND_API_PATH }} | ||
| secrets: | ||
| token: ${{ secrets.token }} | ||
| entra_username: ${{ secrets.ENTRA_USERNAME }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Want to make sure Actions is not case sensitive, this doesn't need to be
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The org secret name is all caps |
||
| entra_password: ${{ secrets.ENTRA_PASSWORD }} | ||
| command_client_id: ${{ secrets.COMMAND_CLIENT_ID }} | ||
| command_client_secret: ${{ secrets.COMMAND_CLIENT_SECRET }} | ||
|
|
||
| call-update-catalog-workflow: | ||
| needs: call-assign-from-json-workflow | ||
| if: needs.call-assign-from-json-workflow.outputs.update_catalog == 'true' && github.ref_name == 'main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') | ||
| uses: Keyfactor/actions/.github/workflows/update-catalog.yml@v3 | ||
| secrets: | ||
| uses: Keyfactor/actions/.github/workflows/update-catalog.yml@v4 | ||
| secrets: | ||
| token: ${{ secrets.token }} | ||
|
|
||
| call-repository-configuration-workflow: | ||
| if: github.event_name == 'create' && startsWith(github.ref, 'refs/heads/release-') | ||
| uses: Keyfactor/actions/.github/workflows/kf-configure-repo.yml@v3 | ||
| secrets: | ||
| uses: Keyfactor/actions/.github/workflows/kf-configure-repo.yml@v4 | ||
| secrets: | ||
| token: ${{ secrets.token }} | ||
|
|
||
| # call-polaris-scan-workflow: | ||
| # if: github.event_name == 'pull_request' && (startsWith(github.base_ref, 'release-') || github.base_ref == 'main') | ||
| # uses: Keyfactor/actions/.github/workflows/kf-polaris-scan.yml@v3 | ||
| # with: | ||
| # scan_branch: ${{ github.event.pull_request.head.ref }} | ||
| # secrets: | ||
| # token: ${{ secrets.scan_token }} | ||
| call-polaris-scan-workflow: | ||
| if: github.event_name == 'pull_request' && (startsWith(github.base_ref, 'release-') || github.base_ref == 'main') | ||
| uses: Keyfactor/actions/.github/workflows/kf-polaris-scan.yml@v4 | ||
| with: | ||
| scan_branch: ${{ github.event.pull_request.head.ref }} | ||
| secrets: | ||
| token: ${{ secrets.scan_token }} | ||
|
|
||
| call-post-release-workflow: | ||
| needs: [call-assign-from-json-workflow, call-create-github-release-workflow] | ||
| if: needs.call-create-github-release-workflow.outputs.IS_FULL_RELEASE == 'True' | ||
| uses: Keyfactor/actions/.github/workflows/kf-post-release.yml@v3 | ||
| secrets: | ||
| token: ${{ secrets.token }} | ||
| with: | ||
| branchname: ${{ github.event.pull_request.base.ref }} | ||
| release_version: ${{ needs.call-create-github-release-workflow.outputs.release_version }} | ||
| needs: [ call-assign-from-json-workflow, call-create-github-release-workflow ] | ||
| if: needs.call-create-github-release-workflow.outputs.IS_FULL_RELEASE == 'True' | ||
| uses: Keyfactor/actions/.github/workflows/kf-post-release.yml@v4 | ||
| secrets: | ||
| token: ${{ secrets.token }} | ||
| with: | ||
| branchname: ${{ github.event.pull_request.base.ref }} | ||
| release_version: ${{ needs.call-create-github-release-workflow.outputs.release_version }} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to make sure, but this doesn't need to be
inputs.command_token_url, etc., does it?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I initially had used
inputs.for all these params before and things weren't working, but the workflow is working as-is so I think this is fine