Skip to content

Commit

Permalink
chore: Use buildin var for Branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
hypery2k committed Sep 30, 2023
1 parent 195cf63 commit 27bd8ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,12 @@ jobs:
- name: Wait for Keycloak server
run: .bin/wait-for-server.sh

- name: Extract branch name
id: extract_branch
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT

- name: Run end2end tests
run: npm run end2end:test
env:
WEBHOOK_TESTING_TEAMS: ${{ secrets.WEBHOOK_TESTING_TEAMS }}
WEBHOOK_TESTING_SLACK: ${{ secrets.WEBHOOK_TESTING_SLACK }}
WEBHOOK_ADDITIONAL_MESSAGE: ${{ steps.extract_branch.outputs.branch }}
WEBHOOK_ADDITIONAL_MESSAGE: ${{ github.ref }}

package:
name: Build Container Image
Expand Down
10 changes: 6 additions & 4 deletions e2e/spec/webhooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ test(
'--output=webhook',
'--webhookType=teams',
'--webhookUrl=' + process.env.WEBHOOK_TESTING_TEAMS,
('--webhookMessage="' + process.env.WEBHOOK_ADDITIONAL_MESSAGE) |
('From Github Actions' + '"')
'--webhookMessage="' +
(process.env.WEBHOOK_ADDITIONAL_MESSAGE |
('From Github Actions' + '"'))
],
{
env: {
Expand Down Expand Up @@ -85,8 +86,9 @@ test(
'--output=webhook',
'--webhookType=slack',
'--webhookUrl=' + process.env.WEBHOOK_TESTING_SLACK,
('--webhookMessage="' + process.env.WEBHOOK_ADDITIONAL_MESSAGE) |
('From Github Actions' + '"')
'--webhookMessage="' +
(process.env.WEBHOOK_ADDITIONAL_MESSAGE |
('From Github Actions' + '"'))
],
{
env: {
Expand Down

0 comments on commit 27bd8ec

Please sign in to comment.