[GHA] Fail early when required secret not set.
This commit is contained in:
parent
70c5520466
commit
1c7163e2ce
|
@ -63,7 +63,7 @@ RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
|
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
|
||||||
|
|
||||||
RUN --mount=type=secret,id=REPO_PASSWORD \
|
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
|
||||||
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
||||||
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
||||||
printf "password " >> /etc/apt/auth.conf && \
|
printf "password " >> /etc/apt/auth.conf && \
|
||||||
|
@ -72,7 +72,6 @@ RUN --mount=type=secret,id=REPO_PASSWORD \
|
||||||
--fail \
|
--fail \
|
||||||
--netrc-file /etc/apt/auth.conf \
|
--netrc-file /etc/apt/auth.conf \
|
||||||
--output ${GPG_KEY} \
|
--output ${GPG_KEY} \
|
||||||
--silent \
|
|
||||||
https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg && \
|
https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg && \
|
||||||
file ${GPG_KEY} && \
|
file ${GPG_KEY} && \
|
||||||
apt-get --quiet update && \
|
apt-get --quiet update && \
|
||||||
|
|
|
@ -63,7 +63,7 @@ RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
|
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
|
||||||
|
|
||||||
RUN --mount=type=secret,id=REPO_PASSWORD \
|
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
|
||||||
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
||||||
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
||||||
printf "password " >> /etc/apt/auth.conf && \
|
printf "password " >> /etc/apt/auth.conf && \
|
||||||
|
@ -72,7 +72,6 @@ RUN --mount=type=secret,id=REPO_PASSWORD \
|
||||||
--fail \
|
--fail \
|
||||||
--netrc-file /etc/apt/auth.conf \
|
--netrc-file /etc/apt/auth.conf \
|
||||||
--output ${GPG_KEY} \
|
--output ${GPG_KEY} \
|
||||||
--silent \
|
|
||||||
https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev/signalwire-freeswitch-repo.gpg && \
|
https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev/signalwire-freeswitch-repo.gpg && \
|
||||||
file ${GPG_KEY} && \
|
file ${GPG_KEY} && \
|
||||||
apt-get --quiet update && \
|
apt-get --quiet update && \
|
||||||
|
|
|
@ -63,7 +63,7 @@ RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a arm64 ${CODENAME}
|
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a arm64 ${CODENAME}
|
||||||
|
|
||||||
RUN --mount=type=secret,id=REPO_PASSWORD \
|
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
|
||||||
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
||||||
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
||||||
printf "password " >> /etc/apt/auth.conf && \
|
printf "password " >> /etc/apt/auth.conf && \
|
||||||
|
@ -72,7 +72,6 @@ RUN --mount=type=secret,id=REPO_PASSWORD \
|
||||||
--fail \
|
--fail \
|
||||||
--netrc-file /etc/apt/auth.conf \
|
--netrc-file /etc/apt/auth.conf \
|
||||||
--output ${GPG_KEY} \
|
--output ${GPG_KEY} \
|
||||||
--silent \
|
|
||||||
https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg && \
|
https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg && \
|
||||||
file ${GPG_KEY} && \
|
file ${GPG_KEY} && \
|
||||||
apt-get --quiet update && \
|
apt-get --quiet update && \
|
||||||
|
|
|
@ -63,7 +63,7 @@ RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
|
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
|
||||||
|
|
||||||
RUN --mount=type=secret,id=REPO_PASSWORD \
|
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
|
||||||
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
||||||
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
||||||
printf "password " >> /etc/apt/auth.conf && \
|
printf "password " >> /etc/apt/auth.conf && \
|
||||||
|
@ -72,7 +72,6 @@ RUN --mount=type=secret,id=REPO_PASSWORD \
|
||||||
--fail \
|
--fail \
|
||||||
--netrc-file /etc/apt/auth.conf \
|
--netrc-file /etc/apt/auth.conf \
|
||||||
--output ${GPG_KEY} \
|
--output ${GPG_KEY} \
|
||||||
--silent \
|
|
||||||
https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg && \
|
https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg && \
|
||||||
file ${GPG_KEY} && \
|
file ${GPG_KEY} && \
|
||||||
apt-get --quiet update && \
|
apt-get --quiet update && \
|
||||||
|
|
|
@ -63,7 +63,7 @@ RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
|
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
|
||||||
|
|
||||||
RUN --mount=type=secret,id=REPO_PASSWORD \
|
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
|
||||||
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
||||||
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
||||||
printf "password " >> /etc/apt/auth.conf && \
|
printf "password " >> /etc/apt/auth.conf && \
|
||||||
|
@ -72,7 +72,6 @@ RUN --mount=type=secret,id=REPO_PASSWORD \
|
||||||
--fail \
|
--fail \
|
||||||
--netrc-file /etc/apt/auth.conf \
|
--netrc-file /etc/apt/auth.conf \
|
||||||
--output ${GPG_KEY} \
|
--output ${GPG_KEY} \
|
||||||
--silent \
|
|
||||||
https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev/signalwire-freeswitch-repo.gpg && \
|
https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev/signalwire-freeswitch-repo.gpg && \
|
||||||
file ${GPG_KEY} && \
|
file ${GPG_KEY} && \
|
||||||
apt-get --quiet update && \
|
apt-get --quiet update && \
|
||||||
|
|
|
@ -63,7 +63,7 @@ RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a arm64 ${CODENAME}
|
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a arm64 ${CODENAME}
|
||||||
|
|
||||||
RUN --mount=type=secret,id=REPO_PASSWORD \
|
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
|
||||||
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
||||||
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
||||||
printf "password " >> /etc/apt/auth.conf && \
|
printf "password " >> /etc/apt/auth.conf && \
|
||||||
|
@ -72,7 +72,6 @@ RUN --mount=type=secret,id=REPO_PASSWORD \
|
||||||
--fail \
|
--fail \
|
||||||
--netrc-file /etc/apt/auth.conf \
|
--netrc-file /etc/apt/auth.conf \
|
||||||
--output ${GPG_KEY} \
|
--output ${GPG_KEY} \
|
||||||
--silent \
|
|
||||||
https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg && \
|
https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg && \
|
||||||
file ${GPG_KEY} && \
|
file ${GPG_KEY} && \
|
||||||
apt-get --quiet update && \
|
apt-get --quiet update && \
|
||||||
|
|
|
@ -64,7 +64,7 @@ RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
|
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
|
||||||
|
|
||||||
RUN --mount=type=secret,id=REPO_PASSWORD \
|
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
|
||||||
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
||||||
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
||||||
printf "password " >> /etc/apt/auth.conf && \
|
printf "password " >> /etc/apt/auth.conf && \
|
||||||
|
@ -73,7 +73,6 @@ RUN --mount=type=secret,id=REPO_PASSWORD \
|
||||||
--fail \
|
--fail \
|
||||||
--netrc-file /etc/apt/auth.conf \
|
--netrc-file /etc/apt/auth.conf \
|
||||||
--output ${GPG_KEY} \
|
--output ${GPG_KEY} \
|
||||||
--silent \
|
|
||||||
https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg && \
|
https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg && \
|
||||||
file ${GPG_KEY} && \
|
file ${GPG_KEY} && \
|
||||||
apt-get --quiet update && \
|
apt-get --quiet update && \
|
||||||
|
|
|
@ -63,7 +63,7 @@ RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
|
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
|
||||||
|
|
||||||
RUN --mount=type=secret,id=REPO_PASSWORD \
|
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
|
||||||
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
||||||
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
||||||
printf "password " >> /etc/apt/auth.conf && \
|
printf "password " >> /etc/apt/auth.conf && \
|
||||||
|
@ -72,7 +72,6 @@ RUN --mount=type=secret,id=REPO_PASSWORD \
|
||||||
--fail \
|
--fail \
|
||||||
--netrc-file /etc/apt/auth.conf \
|
--netrc-file /etc/apt/auth.conf \
|
||||||
--output ${GPG_KEY} \
|
--output ${GPG_KEY} \
|
||||||
--silent \
|
|
||||||
https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev/signalwire-freeswitch-repo.gpg && \
|
https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev/signalwire-freeswitch-repo.gpg && \
|
||||||
file ${GPG_KEY} && \
|
file ${GPG_KEY} && \
|
||||||
apt-get --quiet update && \
|
apt-get --quiet update && \
|
||||||
|
|
|
@ -63,7 +63,7 @@ RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a arm64 ${CODENAME}
|
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a arm64 ${CODENAME}
|
||||||
|
|
||||||
RUN --mount=type=secret,id=REPO_PASSWORD \
|
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
|
||||||
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
||||||
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
||||||
printf "password " >> /etc/apt/auth.conf && \
|
printf "password " >> /etc/apt/auth.conf && \
|
||||||
|
@ -72,7 +72,6 @@ RUN --mount=type=secret,id=REPO_PASSWORD \
|
||||||
--fail \
|
--fail \
|
||||||
--netrc-file /etc/apt/auth.conf \
|
--netrc-file /etc/apt/auth.conf \
|
||||||
--output ${GPG_KEY} \
|
--output ${GPG_KEY} \
|
||||||
--silent \
|
|
||||||
https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg && \
|
https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg && \
|
||||||
file ${GPG_KEY} && \
|
file ${GPG_KEY} && \
|
||||||
apt-get --quiet update && \
|
apt-get --quiet update && \
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
name: Build and Distribute
|
name: Build and Distribute
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- ready_for_review
|
||||||
|
paths:
|
||||||
|
- '**'
|
||||||
|
- '!.github/'
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
@ -23,7 +29,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
JSON="[]"
|
JSON="[]"
|
||||||
|
|
||||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
if [[ "${{ github.event_name }}" == "pull_request" || "${{ github.event_name }}" == "pull_request_target" ]]; then
|
||||||
JSON=$(jq -n '[
|
JSON=$(jq -n '[
|
||||||
{
|
{
|
||||||
"version": "bookworm",
|
"version": "bookworm",
|
||||||
|
|
Loading…
Reference in New Issue