summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-12-17 13:53:26 -0500
committerBenjamin Chausse <benjamin@chausse.xyz>2024-12-17 13:53:26 -0500
commit7eb1912287b59d6e8c78727862bbdd982e7dbe5a (patch)
tree3fbd34077344b285d4adf1d94c654de115ac4d5e /.github
parent7938c2926338526390624a1f9004f6ad2699cd2b (diff)
Github workflow to publish to the AURaur-pub
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/aur.yml35
1 files changed, 35 insertions, 0 deletions
diff --git a/.github/workflows/aur.yml b/.github/workflows/aur.yml
new file mode 100644
index 0000000..1f27d0e
--- /dev/null
+++ b/.github/workflows/aur.yml
@@ -0,0 +1,35 @@
+---
+name: Publish to the AUR
+on:
+ workflow_dispatch: # Manual trigger via GitHub UI
+jobs:
+ build-and-run:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v2
+ - name: Set environment variables
+ id: set-vars
+ run: |
+ echo "PKG_NAME=$(basename ${GITHUB_REPOSITORY})" >> $GITHUB_ENV
+ echo "PKG_REPO_URI=https://github.com/${GITHUB_REPOSITORY}" >> $GITHUB_ENV
+ - name: Build the Docker image
+ run: |
+ docker build -t aur-publisher ./releases/aur
+ - name: Run the Docker container
+ env:
+ AUR_PRIVATE_KEY: ${{ secrets.AUR_PRIVATE_KEY }}
+ AUR_PUBLIC_KEY: ${{ secrets.AUR_PUBLIC_KEY }}
+ PKG_REPO_URI: ${{ env.PKG_REPO_URI }}
+ PKG_NAME: ${{ env.PKG_NAME }}
+ GIT_USER: ${{ secrets.GIT_USER }}
+ run: |-
+ docker run --rm \
+ -e AUR_PRIVATE_KEY=$AUR_PRIVATE_KEY \
+ -e AUR_PUBLIC_KEY=$AUR_PUBLIC_KEY \
+ -e PKG_REPO_URI=$PKG_REPO_URI \
+ -e PKG_NAME=$PKG_NAME \
+ -e GIT_USER=$GIT_USER \
+ aur-publisher