Skip to content
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

[No QA] Use vanilla setupGitForOSBotify action in createNewVersion.yml #32848

Merged
merged 5 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions .github/workflows/createNewVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ on:
OS_BOTIFY_COMMIT_TOKEN:
description: OSBotify personal access token, used to workaround committing to protected branch
required: true
OS_BOTIFY_APP_ID:
description: Application ID for OS Botify App
required: true
OS_BOTIFY_PRIVATE_KEY:
description: OSBotify private key
required: true

jobs:
validateActor:
Expand Down Expand Up @@ -76,18 +70,16 @@ jobs:
token: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}

- name: Setup git for OSBotify
uses: ./.github/actions/composite/setupGitForOSBotifyApp
uses: ./.github/actions/composite/setupGitForOSBotify
id: setupGitForOSBotify
with:
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
OS_BOTIFY_APP_ID: ${{ secrets.OS_BOTIFY_APP_ID }}
OS_BOTIFY_PRIVATE_KEY: ${{ secrets.OS_BOTIFY_PRIVATE_KEY }}

- name: Generate version
id: bumpVersion
uses: ./.github/actions/javascript/bumpVersion
with:
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}
SEMVER_LEVEL: ${{ inputs.SEMVER_LEVEL }}

- name: Commit new version
Expand Down
16 changes: 2 additions & 14 deletions workflow_tests/assertions/createNewVersionAssertions.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,15 @@ const assertCreateNewVersionJobExecuted = (workflowResult, semverLevel = 'BUILD'
],
[],
),
utils.createStepAssertion(
'Setup git for OSBotify',
true,
null,
'CREATENEWVERSION',
'Setup git for OSBotify',
[
{key: 'GPG_PASSPHRASE', value: '***'},
{key: 'OS_BOTIFY_APP_ID', value: '***'},
{key: 'OS_BOTIFY_PRIVATE_KEY', value: '***'},
],
[],
),
utils.createStepAssertion('Setup git for OSBotify', true, null, 'CREATENEWVERSION', 'Setup git for OSBotify', [{key: 'GPG_PASSPHRASE', value: '***'}], []),
utils.createStepAssertion(
'Generate version',
true,
null,
'CREATENEWVERSION',
'Generate version',
[
{key: 'GITHUB_TOKEN', value: 'os_botify_api_token'},
{key: 'GITHUB_TOKEN', value: '***'},
{key: 'SEMVER_LEVEL', value: semverLevel},
],
[],
Expand Down
3 changes: 1 addition & 2 deletions workflow_tests/mocks/createNewVersionMocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ const CREATENEWVERSION__CREATENEWVERSION__SETUP_GIT_FOR_OSBOTIFY__STEP_MOCK = ut
'Setup git for OSBotify',
'Setup git for OSBotify',
'CREATENEWVERSION',
['GPG_PASSPHRASE', 'OS_BOTIFY_APP_ID', 'OS_BOTIFY_PRIVATE_KEY'],
['GPG_PASSPHRASE'],
[],
{OS_BOTIFY_API_TOKEN: 'os_botify_api_token'},
);
const CREATENEWVERSION__CREATENEWVERSION__GENERATE_VERSION__STEP_MOCK = utils.createMockStep(
'Generate version',
Expand Down
Loading