mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
ci: skip deb upload if no creds
This commit is contained in:
@@ -160,8 +160,20 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
make dpkg DEBARCH=${{ matrix.arch }}
|
make dpkg DEBARCH=${{ matrix.arch }}
|
||||||
|
|
||||||
|
- name: "Check aptly credentials"
|
||||||
|
env:
|
||||||
|
APTLY_USER: ${{ secrets.APTLY_USER }}
|
||||||
|
APTLY_PASSWORD: ${{ secrets.APTLY_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
found=no
|
||||||
|
if [ -n "$APTLY_USER" ] && [ -n "$APTLY_PASSWORD" ]; then
|
||||||
|
found=yes
|
||||||
|
fi
|
||||||
|
echo "FOUND=$found" >> $GITHUB_OUTPUT
|
||||||
|
id: aptlycreds
|
||||||
|
|
||||||
- name: "Publish CI release to aptly"
|
- name: "Publish CI release to aptly"
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master' && steps.aptlycreds.outputs.FOUND == 'yes'
|
||||||
env:
|
env:
|
||||||
APTLY_USER: ${{ secrets.APTLY_USER }}
|
APTLY_USER: ${{ secrets.APTLY_USER }}
|
||||||
APTLY_PASSWORD: ${{ secrets.APTLY_PASSWORD }}
|
APTLY_PASSWORD: ${{ secrets.APTLY_PASSWORD }}
|
||||||
@@ -169,7 +181,7 @@ jobs:
|
|||||||
./upload-artifacts.sh ci ${{ matrix.suite }}
|
./upload-artifacts.sh ci ${{ matrix.suite }}
|
||||||
|
|
||||||
- name: "Publish release to aptly"
|
- name: "Publish release to aptly"
|
||||||
if: startsWith(github.event.ref, 'refs/tags')
|
if: startsWith(github.event.ref, 'refs/tags') && steps.aptlycreds.outputs.FOUND == 'yes'
|
||||||
env:
|
env:
|
||||||
APTLY_USER: ${{ secrets.APTLY_USER }}
|
APTLY_USER: ${{ secrets.APTLY_USER }}
|
||||||
APTLY_PASSWORD: ${{ secrets.APTLY_PASSWORD }}
|
APTLY_PASSWORD: ${{ secrets.APTLY_PASSWORD }}
|
||||||
|
|||||||
Reference in New Issue
Block a user