Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
muink committed Aug 27, 2024
1 parent 51e971f commit d8949fc
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,22 @@ jobs:
echo "Building for $BRANCH"
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
- name: Check ${{ env.BRANCH }} if deployed
run: |
rcode=$(curl -sL -w '%{http_code}' -o /dev/null https://github.com/$GITHUB_REPOSITORY/tree/$BRANCH)
if [ "$rcode" != "404" ]; then
echo Branch $BRANCH is deployed. will be used.
BUILDBRANCH="$BRANCH"
else
echo Branch $BRANCH is not deployed, branch $GITHUB_REF_NAME will be used.
BUILDBRANCH="$GITHUB_REF_NAME"
fi
echo "BUILDBRANCH=$BUILDBRANCH" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH }}
ref: ${{ env.BUILDBRANCH }}
lfs: true
submodules: true

Expand Down

0 comments on commit d8949fc

Please sign in to comment.