Skip to content

Commit 3bf4b77

Browse files
committed
insert apt again with test env for testing
1 parent 276bacd commit 3bf4b77

File tree

3 files changed

+39
-3
lines changed

3 files changed

+39
-3
lines changed

.aptly.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"S3PublishEndpoints": {
2424
"distribution": {
2525
"region": "eu01",
26-
"bucket": "distribution",
26+
"bucket": "distribution-test",
2727
"acl":"public-read",
2828
"endpoint": "https://object.storage.eu01.onstackit.cloud"
2929
}

.github/workflows/release.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,43 @@ jobs:
9191
path: dist
9292
retention-days: 1
9393

94+
publish-apt:
95+
name: Publish APT
96+
runs-on: macOS-latest
97+
needs: [goreleaser]
98+
env:
99+
# Needed to publish new packages to our S3-hosted APT repo
100+
AWS_ACCESS_KEY_ID: ${{ secrets.TEST_OBJECT_STORAGE_ACCESS_KEY_ID }}
101+
AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_OBJECT_STORAGE_SECRET_ACCESS_KEY }}
102+
AWS_DEFAULT_REGION: eu01
103+
AWS_ENDPOINT_URL: https://object.storage.eu01.onstackit.cloud
104+
steps:
105+
- name: Checkout
106+
uses: actions/checkout@v5
94107

108+
# use the artifacts from the "goreleaser" job
109+
- name: Download artifacts from workflow
110+
uses: actions/download-artifact@v5
111+
with:
112+
name: goreleaser-dist-temp
113+
path: dist
114+
115+
- name: Install Aptly
116+
run: brew install aptly
117+
118+
- name: Import GPG key
119+
uses: crazy-max/ghaction-import-gpg@v6
120+
id: import_gpg
121+
with:
122+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
123+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
124+
125+
- name: Publish packages to APT repo
126+
# if: contains(github.ref_name, '-') == false
127+
env:
128+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
129+
GPG_PRIVATE_KEY_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
130+
run: ./scripts/publish-apt-packages.sh
95131

96132
publish-rpm:
97133
name: Publish RPM

scripts/publish-apt-packages.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
# Usage: ./publish-apt-packages.sh
55
set -eo pipefail
66

7-
PACKAGES_BUCKET_URL="https://packages.stackit.cloud"
7+
PACKAGES_BUCKET_URL="https://distribution-test.object.storage.eu01.onstackit.cloud"
88
PUBLIC_KEY_FILE_PATH="keys/key.gpg"
99
APT_REPO_PATH="apt/cli"
10-
APT_BUCKET_NAME="distribution"
10+
APT_BUCKET_NAME="distribution-test"
1111
CUSTOM_KEYRING_FILE="aptly-keyring.gpg"
1212
DISTRIBUTION="stackit"
1313
APTLY_CONFIG_FILE_PATH="./.aptly.conf"

0 commit comments

Comments
 (0)