Skip to content

Commit

Permalink
get version from inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
frontegg-david committed Sep 6, 2023
1 parent f0ebc6a commit 30457a4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/publish-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ jobs:
ref: process.env.PR_REF,
inputs: {
version: process.env.PR_VERSION,
dispatch_id: `${repo}/${sha}`,
repo,
sha
}
});
- name : Notify Slack on alpha version deployment
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/trigger-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@ jobs:
steps:
- name: "Trigger E2E tests"
uses: actions/github-script@v5
env:
version: ${{ inputs.version }}
dispatch_id: ${{ inputs.dispatch_id }}
with:
github-token: ${{ secrets.GH_REPOSITORY_ADMIN_TOKEN }}
script: |
const sha = context.payload.after;
const repo = context.payload.repository.name
const {repo, sha, version} = process.env;
const owner = context.payload.repository.organization
const e2eRepo = 'e2e-system-tests'
const workflow_id = 'frontegg-react-e2e-tests.yml'
const context = `${owner}/${e2eRepo}`
const dispatch_id = `${repo}/${sha}`;
const dispatch_id = `${repo}/${sha}`
const res = await github.rest.repos.createCommitStatus({
context, owner, repo, sha,
Expand All @@ -35,10 +37,12 @@ jobs:
});
const data = await github.rest.actions.createWorkflowDispatch({
owner, repo:e2eRepo, workflow_id,
owner,
repo:e2eRepo,
workflow_id,
ref: 'main',
inputs: {
version: '1.0.0',
version,
dispatch_id,
}
});

0 comments on commit 30457a4

Please sign in to comment.