Skip to content

Commit 2912e46

Browse files
committed
for loop
1 parent 968b3b2 commit 2912e46

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

.github/workflows/release.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,17 @@ jobs:
248248
sudo apt update -y
249249
sudo apt install -y awscli curl jq
250250
251-
#For trixie
252-
aws s3 cp s3://apt.defguard.net/dists/trixie/Release .
253-
curl -X POST "${{ secrets.DEFGUARD_SIGNING_URL }}?signature_type=both" \
254-
-H "Authorization: Bearer ${{ secrets.DEFGUARD_SIGNING_API_KEY }}" \
255-
-F "file=@Release" \
256-
-o response.json
257-
cat response.json | jq -r '.files["Release.gpg"].content' | base64 --decode > Release.gpg
258-
cat response.json | jq -r '.files.Release.content' | base64 --decode > InRelease
259-
aws s3 cp Release.gpg s3://apt.defguard.net/dists/trixie/ --acl public-read
260-
aws s3 cp InRelease s3://apt.defguard.net/dists/trixie/ --acl public-read
251+
for DIST in trixie; do
252+
aws s3 cp s3://apt.defguard.net/dists/{$DIST}/Release .
253+
254+
curl -X POST "${{ secrets.DEFGUARD_SIGNING_URL }}?signature_type=both" \
255+
-H "Authorization: Bearer ${{ secrets.DEFGUARD_SIGNING_API_KEY }}" \
256+
-F "file=@Release" \
257+
-o response.json
258+
259+
cat response.json | jq -r '.files["Release.gpg"].content' | base64 --decode > Release.gpg
260+
cat response.json | jq -r '.files.Release.content' | base64 --decode > InRelease
261+
262+
aws s3 cp Release.gpg s3://apt.defguard.net/dists/${DIST}/ --acl public-read
263+
aws s3 cp InRelease s3://apt.defguard.net/dists/${DIST}/ --acl public-read
264+
done

0 commit comments

Comments
 (0)