Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflows: checkout fallback to plugins/develop #704

Merged
merged 1 commit into from
Jan 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,25 @@ jobs:
repository: smarthomeNG/smarthome
ref: ${{steps.extract_branch.outputs.branch}}
path: smarthomeng

- name: Checkout repository PLUGINS ${{steps.extract_branch.outputs.branch}} Branch

- name: Check if branch '${{ steps.extract_branch.outputs.branch }}' exists in smarthomeNG/plugins
run: echo "code=$(git ls-remote --exit-code --heads https://github.com/smarthomeNG/plugins ${{ steps.extract_branch.outputs.branch }} > /dev/null; echo $? )" >>$GITHUB_OUTPUT
id: plugins_branch_check

- name: Checkout plugins from branch '${{ steps.extract_branch.outputs.branch }}' (for push on known smarthomeNG/smarthome branch)
if: github.event_name != 'pull_request' && steps.plugins_branch_check.outputs.code == '0'
uses: actions/checkout@v3
with:
repository: smarthomeNG/smarthome
ref: ${{steps.extract_branch.outputs.branch}}
path: plugins

repository: smarthomeNG/plugins
ref: ${{ steps.extract_branch.outputs.branch }}

- name: Checkout plugins from branch 'develop' (for pull request or push on unknown smarthomeNG/smarthome branch)
if: github.event_name == 'pull_request' || steps.plugins_branch_check.outputs.code == '2'
uses: actions/checkout@v3
with:
repository: smarthomeNG/plugins
ref: develop

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down