Skip to content

Commit

Permalink
workflows: replace deprecated 'set-output'; (re)joined pr_unittests i…
Browse files Browse the repository at this point in the history
…nto unittests.yml
  • Loading branch information
msinn committed Mar 17, 2023
1 parent 06adc95 commit 96fff38
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr_unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
pull_request:
branches:
- 'develop'
- '!develop'

jobs:
build:
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:
branches:
- '*'
- '!release_doc'

pull_request:
branches:
- 'develop'
jobs:
build:
runs-on: ubuntu-20.04 #latest
Expand All @@ -24,16 +26,23 @@ jobs:
sudo apt-get install gcc --only-upgrade
- name: Get branch name
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo ${GITHUB_REF#refs/heads/}
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >>$GITHUB_OUTPUT
id: extract_branch

- name: Checkout core from ${{steps.extract_branch.outputs.branch}} branch
- name: Checkout core from branch '${{steps.extract_branch.outputs.branch}}'
if: github.event_name != 'pull_request'
uses: actions/checkout@v3
with:
repository: smarthomeNG/smarthome
ref: ${{steps.extract_branch.outputs.branch}}

- name: Checkout core from branch 'develop' (for pull request)
if: github.event_name == 'pull_request'
uses: actions/checkout@v3
with:
repository: smarthomeNG/smarthome
ref: develop

- name: Checkout plugins from ${{steps.extract_branch.outputs.branch}} branch
uses: actions/checkout@v3
with:
Expand Down

0 comments on commit 96fff38

Please sign in to comment.