|
64 | 64 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
65 | 65 | with:
|
66 | 66 | args: 'heplify*'
|
| 67 | + |
| 68 | + - name: Check PACKAGECLOUD secret presence |
| 69 | + id: checkpackagecloud |
| 70 | + shell: bash |
| 71 | + run: | |
| 72 | + if [ "$SECRET" == "" ] || [ "$USERNAME" == "" ]; then |
| 73 | + echo "secretspresent=false" >> $GITHUB_OUTPUT |
| 74 | + else |
| 75 | + echo "secretspresent=true" >> $GITHUB_OUTPUT |
| 76 | + fi |
| 77 | + env: |
| 78 | + SECRET: ${{ secrets.PACKAGECLOUD_TOKEN }} |
| 79 | + USERNAME: ${{ secrets.PACKAGECLOUD_USERNAME }} |
| 80 | + |
| 81 | + - name: upload deb packagecloud |
| 82 | + if: ${{ matrix.arch != 'aarch64' && steps.checkpackagecloud.outputs.secretspresent == 'true' }} |
| 83 | + uses: danielmundi/upload-packagecloud@v1 |
| 84 | + with: |
| 85 | + PACKAGE-NAME: heplify-*-amd64.deb |
| 86 | + PACKAGECLOUD-REPO: sipcapture |
| 87 | + PACKAGECLOUD-DISTRIB: any/any |
| 88 | + PACKAGECLOUD-USERNAME: ${{ secrets.PACKAGECLOUD_USERNAME }} |
| 89 | + PACKAGECLOUD-TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} |
| 90 | + continue-on-error: true |
| 91 | + |
| 92 | + - name: upload rpm packagecloud |
| 93 | + if: ${{ matrix.arch != 'aarch64' && steps.checkpackagecloud.outputs.secretspresent == 'true' }} |
| 94 | + uses: danielmundi/upload-packagecloud@v1 |
| 95 | + with: |
| 96 | + PACKAGE-NAME: heplify-*-amd64.rpm |
| 97 | + PACKAGECLOUD-REPO: sipcapture |
| 98 | + PACKAGECLOUD-DISTRIB: rpm_any/rpm_any |
| 99 | + PACKAGECLOUD-USERNAME: ${{ secrets.PACKAGECLOUD_USERNAME }} |
| 100 | + PACKAGECLOUD-TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} |
| 101 | + continue-on-error: true |
67 | 102 |
|
68 | 103 | docker-ghcr-push:
|
69 | 104 | if: ${{ github.event_name != 'workflow_dispatch' }}
|
@@ -110,9 +145,22 @@ jobs:
|
110 | 145 | contents: read
|
111 | 146 |
|
112 | 147 | steps:
|
| 148 | + - name: Check Docker secret presence |
| 149 | + id: checkdocker |
| 150 | + shell: bash |
| 151 | + run: | |
| 152 | + if [ "$SECRET" == "" ] || [ "$USERNAME" == "" ]; then |
| 153 | + echo "secretspresent=false" >> $GITHUB_OUTPUT |
| 154 | + else |
| 155 | + echo "secretspresent=true" >> $GITHUB_OUTPUT |
| 156 | + fi |
| 157 | + env: |
| 158 | + SECRET: ${{ secrets.DOCKERHUB_TOKEN }} |
| 159 | + USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} |
| 160 | + |
113 | 161 | - uses: actions/checkout@v4
|
114 | 162 | - name: Login to DockerHub
|
115 |
| - if: ${{ steps.checkdocker.outputs.secretspresent }} |
| 163 | + if: ${{ steps.checkdocker.outputs.secretspresent == 'true' }} |
116 | 164 |
|
117 | 165 | with:
|
118 | 166 | username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
0 commit comments