diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 48c151a4..91347abb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,8 +59,43 @@ jobs: release_name: homer-app-${{ env.TAG_NAME }} draft: false prerelease: false - overwrite: true - + overwrite: true + + - name: Check PACKAGECLOUD secret presence + id: checkpackagecloud + shell: bash + run: | + if [ "$SECRET" == "" ] || [ "$USERNAME" == "" ]; then + echo "secretspresent=false" >> $GITHUB_OUTPUT + else + echo "secretspresent=true" >> $GITHUB_OUTPUT + fi + env: + SECRET: ${{ secrets.PACKAGECLOUD_TOKEN }} + USERNAME: ${{ secrets.PACKAGECLOUD_USERNAME }} + + - name: upload deb packagecloud + if: ${{ steps.checkpackagecloud.outputs.secretspresent == 'true' }} + uses: danielmundi/upload-packagecloud@v1 + with: + PACKAGE-NAME: homer-app-${{ env.TAG_NAME }}-amd64.deb + PACKAGECLOUD-REPO: sipcapture + PACKAGECLOUD-DISTRIB: any/any + PACKAGECLOUD-USERNAME: ${{ secrets.PACKAGECLOUD_USERNAME }} + PACKAGECLOUD-TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} + continue-on-error: true + + - name: upload rpm packagecloud + if: ${{ steps.checkpackagecloud.outputs.secretspresent == 'true' }} + uses: danielmundi/upload-packagecloud@v1 + with: + PACKAGE-NAME: homer-app-${{ env.TAG_NAME }}-amd64.rpm + PACKAGECLOUD-REPO: sipcapture + PACKAGECLOUD-DISTRIB: rpm_any/rpm_any + PACKAGECLOUD-USERNAME: ${{ secrets.PACKAGECLOUD_USERNAME }} + PACKAGECLOUD-TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} + continue-on-error: true + docker-push: if: github.event_name != 'pull_request' runs-on: ubuntu-latest