Skip to content

Commit

Permalink
SNAPSHOT support
Browse files Browse the repository at this point in the history
  • Loading branch information
muink committed Dec 4, 2024
1 parent 0e513be commit 503f386
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,14 @@ jobs:
- name: Determine branch name and Generate op_target_url_prefix
run: |
SNAPSHOTS=$(echo "$OP_VERSION" | grep -q SNAPSHOT && { [ "$OP_VERSION" = "SNAPSHOT" ] && echo y || echo i; } || echo )
echo "SNAPSHOTS=$SNAPSHOTS" >> $GITHUB_ENV
SNAPSHOTS_BRANCH="$(echo "$OP_VERSION" | sed -En 's|^(.+)-SNAPSHOT$|\1|p')"
echo "SNAPSHOTS_BRANCH=$SNAPSHOTS_BRANCH" >> $GITHUB_ENV
BRANCH="$([ -n "$SNAPSHOTS_BRANCH" ] && echo "$SNAPSHOTS_BRANCH" || echo "${OP_VERSION%.*}")"
echo "Building for $BRANCH"
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
op_target_url_prefix="$MIRROR_URL/$([ -n "$SNAPSHOTS_BRANCH" ] && echo 'snapshots' || echo "releases/$OP_VERSION")/targets/${{ inputs.board }}/${{ inputs.subtarget}}"
op_target_url_prefix="$MIRROR_URL/$([ -n "$SNAPSHOTS" ] && echo snapshots || echo "releases/$OP_VERSION")/targets/${{ inputs.board }}/${{ inputs.subtarget}}"
echo "op_target_url_prefix=$op_target_url_prefix" >> $GITHUB_ENV
- name: Check ${{ env.BRANCH }} if deployed
Expand Down Expand Up @@ -299,7 +301,7 @@ jobs:
uses: fantastic-packages/[email protected]
env:
#ARCH: ${{ inputs.ARCH }}-${{ env.OP_VERSION }}
ARCH: ${{ inputs.ARCH }}-${{ env.BRANCH }}-SNAPSHOT
ARCH: ${{ inputs.ARCH }}-${{ env.SNAPSHOTS == 'y' && '' || format('{0}-', env.BRANCH) }}SNAPSHOT
ARTIFACTS_DIR: /workdir
DL_DIR: /workdir/DL
FEED_DIR: ${{ github.workspace }}
Expand Down

0 comments on commit 503f386

Please sign in to comment.