-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: workflow update deb repo (#437)
* feat: publish release to debian repo * chore: add gpg keys for debian repo * fix: rename debian repo * chore: add workflow_dispatch to debian workflow
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Update Deb Repo | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
update-deb-repo: | ||
name: Update Deb Repo | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Get Latest Release | ||
id: release | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
gh release view --json tagName,assets > release.json | ||
echo "VERSION=$(jq -r '.tagName' release.json)" >> $GITHUB_OUTPUT | ||
gh release download -p ceramic-one_x86_64-unknown-linux-gnu.tar.gz | ||
tar xvf ceramic-one_x86_64-unknown-linux-gnu.tar.gz | ||
- name: Set up GPG | ||
run: | | ||
mkdir -p /tmp/gnupg | ||
echo "${{ secrets.REPO_GPG_PRIVATE_KEY }}" | gpg --homedir /tmp/gnupg --import | ||
echo "allow-loopback-pinentry" >> /tmp/gnupg/gpg-agent.conf | ||
echo "pinentry-mode loopback" >> /tmp/gnupg/gpg.conf | ||
- name: Install Dependencies | ||
run: sudo apt-get update && sudo apt-get install -y reprepro | ||
|
||
- name: Checkout Deb Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ceramicnetwork/debian-repo | ||
token: ${{ secrets.GH_TOKEN_PAT }} | ||
- name: Update Deb Repo | ||
working-directory: repo | ||
env: | ||
GPG_PASSPHRASE: ${{ secrets.REPO_GPG_PASSPHRASE }} | ||
run: | | ||
GNUPGHOME=/tmp/gnupg reprepro --basedir . includedeb stable ../ceramic-one.deb | ||
- name: Commit and Push changes | ||
working-directory: repo | ||
run: | | ||
git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git diff | ||
git add . | ||
git commit -m "chore: update ceramic-one deb to ${{ steps.release.outputs.VERSION }}" | ||
git push |