Skip to content

Commit b99defe

Browse files
committed
edit secrets
1 parent bcac4db commit b99defe

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

.github/workflows/release.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ jobs:
189189
export PATH="/srv/github/defguard/.local/share/gem/ruby/3.3.0/bin:$PATH"
190190
COMPONENT=$([[ "${{ github.ref_name }}" == *"-"* ]] && echo "pre-release" || echo "release") # if tag contain "-" assume it's pre-release.
191191
192-
deb-s3 upload -l --bucket=apt.defguard.net --access-key-id=${{ secrets.AWS_ACCESS_KEY }} --secret-access-key=${{ secrets.AWS_SECRET_KEY }} --s3-region=eu-north-1 --no-fail-if-exists --codename=trixie --component="$COMPONENT" defguard-proxy-${{ env.VERSION }}-${{ matrix.target }}.deb
192+
deb-s3 upload -l --bucket=apt.defguard.net --access-key-id=${{ secrets.AWS_ACCESS_KEY_APT }} --secret-access-key=${{ secrets.AWS_SECRET_KEY_APT }} --s3-region=eu-north-1 --no-fail-if-exists --codename=trixie --component="$COMPONENT" defguard-proxy-${{ env.VERSION }}-${{ matrix.target }}.deb
193193
194194
195195
- name: Run `packer init`
@@ -229,3 +229,43 @@ jobs:
229229
# asset_path: defguard-proxy-${{ env.VERSION }}-${{ matrix.target }}.rpm
230230
# asset_name: defguard-proxy-${{ env.VERSION }}-${{ matrix.target }}.rpm
231231
# asset_content_type: application/octet-stream
232+
233+
apt-sign:
234+
needs:
235+
- build-binaries
236+
runs-on:
237+
- self-hosted
238+
- Linux
239+
- X64
240+
strategy:
241+
fail-fast: false
242+
steps:
243+
- name: Sign APT repository on trixie
244+
run: |
245+
export AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_APT }}
246+
export AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_KEY_APT }}
247+
export AWS_REGION=eu-north-1
248+
sudo apt update -y
249+
sudo apt install -y awscli curl jq
250+
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
261+
262+
#For bookworm
263+
aws s3 cp s3://apt.defguard.net/dists/bookworm/Release .
264+
curl -X POST "${{ secrets.DEFGUARD_SIGNING_URL }}?signature_type=both" \
265+
-H "Authorization: Bearer ${{ secrets.DEFGUARD_SIGNING_API_KEY }}" \
266+
-F "file=@Release" \
267+
-o response.json
268+
cat response.json | jq -r '.files["Release.gpg"].content' | base64 --decode > Release.gpg
269+
cat response.json | jq -r '.files.Release.content' | base64 --decode > InRelease
270+
aws s3 cp Release.gpg s3://apt.defguard.net/dists/bookworm/ --acl public-read
271+
aws s3 cp InRelease s3://apt.defguard.net/dists/bookworm/ --acl public-read

0 commit comments

Comments
 (0)