Skip to content

Commit

Permalink
Update openfl-docker-build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
pasokan-intel authored Jan 17, 2025
1 parent 6ce1cb5 commit 154889d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/openfl-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ on:
default: 'latest'

env:
DEFAULT_VERSION: ${{ github.ref == 'refs/heads/develop' && 'latest' || '1.7' }}
DEFAULT_VERSION: ${{
github.ref == 'refs/heads/develop' && 'latest' ||
github.ref == 'refs/heads/v1.7.x' && '1.7' ||
'fail' }}

permissions:
contents: read
Expand All @@ -24,6 +27,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Fail if invalid branch
if: env.DEFAULT_VERSION == 'fail'
run: |
echo "Invalid branch. The workflow only supports 'develop' or 'v1.7.x'."
exit 1
- name: Checkout code
uses: actions/checkout@v3

Expand Down

0 comments on commit 154889d

Please sign in to comment.