Skip to content

Commit

Permalink
add workflow tester 39
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Falourd <[email protected]>
  • Loading branch information
GuillaumeFalourd committed Jun 14, 2022
1 parent 1b8429f commit 7536947
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
16 changes: 1 addition & 15 deletions .github/workflows/workflow-tester36.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,4 @@ jobs:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: echo "$GITHUB_CONTEXT"

- name: Other variables with ENV
run: |
echo "Commits:" $COMMITS
echo "Message:" $MESSAGE
echo "Author Email:" $(echo $AUTHOR | jq -r '.email')
echo "Author Name:" $(echo $AUTHOR | jq -r '.name')
echo "Author Username:" $(echo $AUTHOR | jq -r '.username')
echo "Committer Email:" $(echo $COMMITTER | jq -r '.email')
echo "Committer Name:" $(echo $COMMITTER | jq -r '.name')
echo "Committer Username:" $(echo $COMMITTER | jq -r '.username')
env:
COMMITS: ${{ toJSON(github.event.commits[0]) }}
MESSAGE: ${{ toJSON(github.event.commits[0].message) }}
AUTHOR: ${{ toJSON(github.event.commits[0].author) }}
COMMITTER: ${{ toJSON(github.event.commits[0].committer) }}

18 changes: 18 additions & 0 deletions .github/workflows/workflow-tester39.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Test 39 # Related to https://stackoverflow.com/questions/72613951/in-a-github-action-can-i-extract-a-recurring-variable-or-condition

on:
push:

env:
BRANCH: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/features/lrd') }}


jobs:
job1:
runs-on: ubuntu-latest
steps:
- name: Check branch
if: ${{ env BRANCH }}
run: echo $BRANCH


0 comments on commit 7536947

Please sign in to comment.