Skip to content

Commit

Permalink
Merge pull request #32848 from Expensify/Rory-CreateNewVersionSetupOS…
Browse files Browse the repository at this point in the history
…Botify

[No QA] Use vanilla setupGitForOSBotify action in createNewVersion.yml
  • Loading branch information
mountiny authored Dec 13, 2023
2 parents f77318c + 3bd01fb commit 1fd0989
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 26 deletions.
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

0 comments on commit 1fd0989

Please sign in to comment.