diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index c841996f..e3662c03 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -29,12 +29,18 @@ jobs: - name: Remove stuck mounts run: sudo umount -f /home/ubuntu/actions-runner/_work/RetroDECK/RetroDECK/.flatpak-builder/rofiles/* continue-on-error: true + + - uses: actions/checkout@v3 - name: Generate build ID - id: generating_buildid - run: echo "##[set-output name=build-id;]$(echo "$( git rev-parse --short HEAD )")" - - - uses: actions/checkout@v3 + run: | + word1=$(curl -s https://random-word-api.herokuapp.com/word?length=5 | tr -d '[]"') + capitalized_word1="$(tr '[:lower:]' '[:upper:]' <<< ${word1:0:1})${word1:1}" + word2=$(curl -s https://random-word-api.herokuapp.com/word?length=5 | tr -d '[]"') + capitalized_word2="$(tr '[:lower:]' '[:upper:]' <<< ${word2:0:1})${word2:1}" + result=$capitalized_word1$capitalized_word2 + echo $result >> ${GITHUB_WORKSPACE}/buildid + echo "buildid=$result" >> $GITHUB_ENV - name: Initialize environment run: | @@ -78,7 +84,7 @@ jobs: - name: Publish the flatpak in a new cooker release uses: ncipollo/release-action@v1 with: - tag: "${{ env.GITHUB_REF_SLUG }}-${{ steps.generating_buildid.outputs.build-id }}" + tag: "${{ env.GITHUB_REF_SLUG }}[${{ env.buildid }}]" body: | # Release Notes (Cooker) This is a cooker snapshot based on the commit: ${{ github.event.repository.full_name }}@${{github.sha}}. diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 705ee651..a5058c2b 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -78,7 +78,7 @@ modules: mkdir -p ${FLATPAK_DEST}/retrodeck/ if [[ $VERSION == *"cooker"* ]]; then - VERSION="$VERSION-[$(git rev-parse --short HEAD)]" + VERSION="$VERSION[$echo ./buildid]" fi echo $VERSION >> ${FLATPAK_DEST}/retrodeck/version cat ${FLATPAK_DEST}/retrodeck/version