Skip to content

Commit

Permalink
fix: Fix permision error in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpenedblade committed May 22, 2023
1 parent 136e176 commit 09de580
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,32 @@ jobs:
- name: "Build"
run: |
echo "$RPM_SIGNING_KEY" > ./rpm_signing_key
mkdir -p /output
docker run -t --privileged -v "$PWD":/repo -v /output:/output fedora:38 /bin/bash -c "/repo/build-packages.sh"
mkdir -p /tmp/output
docker run -t --privileged -v "$PWD":/repo -v /tmp/output:/output fedora:38 /bin/bash -c "/repo/build-packages.sh"
env:
RPM_SIGNING_KEY: ${{ secrets.RPM_SIGNING_KEY }}

- name: "Check Packages"
run: |
stat --printf='' /output/kernel*.rpm
stat --printf='' /output/t2linux-config*.rpm
stat --printf='' /output/t2linux-repo*.rpm
stat --printf='' /tmp/output/kernel*.rpm
stat --printf='' /tmp/output/t2linux-config*.rpm
stat --printf='' /tmp/output/t2linux-repo*.rpm
- name: "Release"
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
/output/*.rpm
/tmp/output/*.rpm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update repo
if: startsWith(github.ref, 'refs/tags/')
run: |
mkdir /rpm-repo
docker run -t -v /output:/output -v /rpm-repo:/rpm-repo fedora:38 /bin/bash -c "/repo/build-repo.sh"
cp -r /tmp/repo ./deploy
mkdir -p /tmp/rpm-repo
docker run -t -v /tmp/output:/output -v "$PWD":/repo -v /tmp/rpm-repo:/rpm-repo fedora:38 /bin/bash -c "/repo/build-repo.sh"
cp -r /tmp/rpm-repo ./deploy
- name: Upload
if: startsWith(github.ref, 'refs/tags/')
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
with:
latest: true
fileName: "*.rpm"
out-file-path: "/output/"
out-file-path: "/tmp/output/"

- name: Update repo
run: |
mkdir /tmp/repo
docker run -t -v /output:/output -v /rpm-repo:/rpm-repo fedora:38 /bin/bash -c "/repo/build-repo.sh"
cp -r /rpm-repo ./deploy
docker run -t -v /tmp/output:/output -v /tmp/rpm-repo:/rpm-repo fedora:38 /bin/bash -c "/repo/build-repo.sh"
cp -r /tmp/rpm-repo ./deploy
- name: Upload
uses: netlify/actions/cli@master
Expand Down
6 changes: 0 additions & 6 deletions build-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,3 @@ mkdir -p /output
/repo/scripts/t2linux-fedora.sh
/repo/scripts/kernel.sh
rpm --addsign /output/*.rpm

# Copy artifacts to shared volume
cd "/repo"
mkdir -p ./output
mkdir -p ./output/RPMS
cp -rfv /output/* ./output/RPMS/

0 comments on commit 09de580

Please sign in to comment.