Skip to content

Commit

Permalink
Showing 1 changed file with 52 additions and 1 deletion.
53 changes: 52 additions & 1 deletion .github/workflows/jitpack-build.yml
Original file line number Diff line number Diff line change
@@ -42,4 +42,55 @@ jobs:
done
echo "Failed to trigger JitPack build after $MAX_RETRIES attempts."
exit 1
exit 1
- name: Get POM File
run: |
TAG=${{ steps.get_tag.outputs.tag }}
JITPACK_POM_URL="https://jitpack.io/com/github/cbioportal/cbioportal-frontend/$TAG/cbioportal-frontend-$TAG.pom"
MAX_RETRIES=10
RETRY_DELAY=30
COUNTER=0
while [ $COUNTER -lt $MAX_RETRIES ]; do
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X POST "$JITPACK_POM_URL")
if [ "$HTTP_STATUS" -eq 200 ]; then
echo "POM file successfully found."
exit 0
else
echo "Attempt $((COUNTER+1)) failed with status $HTTP_STATUS: POM file not found yet. Retrying in $RETRY_DELAY seconds..."
COUNTER=$((COUNTER+1))
sleep $RETRY_DELAY
fi
done
echo "Failed to find POM file after $MAX_RETRIES attempts."
exit 1
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.BACKEND_REPO_TOKEN }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Set up git
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
- name: Checkout cbioportal/cbioportal
run: |
git clone git@github.com:cBioPortal/cbioportal.git
- name: Update backend to use latest frontend commit
run: |
TAG=${{ steps.get_tag.outputs.tag }}
cd cbioportal
sed -i "s|<version>\(.*\)-SNAPSHOT</version>|<version>\1</version>|" pom.xml
sed -i "s|<frontend.version>.*</frontend.version>|<frontend.version>$TAG</frontend.version>|" pom.xml
git add pom.xml
git commit -m "Frontend $TAG"
git push

0 comments on commit 0930a25

Please sign in to comment.