Skip to content

Commit

Permalink
ci: Fix package signing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpenedblade committed Jul 12, 2023
1 parent 5475896 commit b9f3b4e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ jobs:
mkdir -p _output
docker run -t --privileged \
-v "$PWD":/repo \
-e RPM_SIGNING_PRIVATE_KEY_B64 \
-e PACKAGE \
fedora:38 /bin/bash -c "/repo/build-packages.sh"
env:
RPM_SIGNING_PRIVATE_KEY_B64: ${{ secrets.RPM_SIGNING_PRIVATE_KEY_B64 }}
PACKAGE: ${{ matrix.package }}

- name: "Check Build Artifacts"
Expand Down Expand Up @@ -63,10 +61,13 @@ jobs:
run: |
docker run -t \
-v $PWD:/repo \
-e RPM_SIGNING_PRIVATE_KEY_B64 \
fedora:38 /bin/bash -c "/repo/sign-packages.sh"
env:
RPM_SIGNING_PRIVATE_KEY_B64: ${{ secrets.RPM_SIGNING_PRIVATE_KEY_B64 }}

- name: "Upload Unified Artifact"
uses: actions/upload-artifact@v3
with:
name: packages
path: _output/*.rpm
path: _output/*.rpm
13 changes: 6 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,26 @@ jobs:
build-repo:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3

- name: "Download Artifacts"
uses: actions/download-artifact@v3
with:
name: packages
path: _output

- name: "Checkout"
uses: actions/checkout@v3

- name: "Build DNF Repo"
run: |
docker run -t \
-v rpm-repo:/rpm-repo \
-v $PWD:/repo \
fedora:38 /bin/bash -c "/repo/generate-dnf-repo.sh"
- name: "Upload DNF repo"
uses: actions/upload-artifact@v3
with:
name: dnf-repo
path: rpm-repo
path: dnf-repo

deploy:
needs: ["build-repo"]
Expand All @@ -37,11 +36,11 @@ jobs:
uses: actions/download-artifact@v3
with:
name: dnf-repo
path: rpm-repo
path: dnf-repo
- name: "Deploy To Repo"
uses: netlify/actions/cli@master
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
with:
args: deploy --dir=rpm-repo --prod
args: deploy --dir=dnf-repo --prod
3 changes: 2 additions & 1 deletion generate-dnf-repo.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dnf install -y --quiet createrepo
cd /rpm-repo
cd /repo
mkdir ./dnf-repo && cd ./dnf-repo
cp /repo/_output/*.rpm .
rm *.src.rpm
createrepo .
1 change: 1 addition & 0 deletions sign-packages.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/bash
source /repo/util.sh
dnf install --quiet -y rpm-sign rpmdevtools

cd /repo/_output
sign_packages $RPM_SIGNING_PRIVATE_KEY_B64 "T2Linux Fedora"

0 comments on commit b9f3b4e

Please sign in to comment.