Skip to content

Commit b07e42d

Browse files
authored
Merge pull request #306 from bilalrao12/master
Update release-alpine.yml
2 parents 7914e85 + ad1e4b9 commit b07e42d

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

.github/workflows/release-alpine.yml

+49-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,41 @@ jobs:
6464
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6565
with:
6666
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
67102

68103
docker-ghcr-push:
69104
if: ${{ github.event_name != 'workflow_dispatch' }}
@@ -110,9 +145,22 @@ jobs:
110145
contents: read
111146

112147
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+
113161
- uses: actions/checkout@v4
114162
- name: Login to DockerHub
115-
if: ${{ steps.checkdocker.outputs.secretspresent }}
163+
if: ${{ steps.checkdocker.outputs.secretspresent == 'true' }}
116164
uses: docker/[email protected]
117165
with:
118166
username: ${{ secrets.DOCKERHUB_USERNAME }}

0 commit comments

Comments
 (0)