diff --git a/.gitea/workflows/workflow.yml b/.gitea/workflows/workflow.yml new file mode 100644 index 0000000..95c7e7f --- /dev/null +++ b/.gitea/workflows/workflow.yml @@ -0,0 +1,64 @@ +on: + push: + branches: + - master + +jobs: + update: + name: Update from AUR + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Configure Git + run: | + git config user.email "sebastiaan.de.schaetzen+archlinux@gmail.com" + git config user.name "Sebastiaan de Schaetzen (automated)" + + - name: Add AUR repository + run: git remote add aur https://aur.archlinux.org/yay.git + + - name: Fetch AUR + run: git fetch aur + + - name: Rebase current changes + run: git rebase aur/master + + - name: Push changes (if any) + run: git push -f origin master + + wake: + name: Wake Runner + runs-on: ubuntu-latest + needs: update + steps: + - name: Wakeup Runner + run: | + curl https://idlesleep.wolproxy.seeseepuff.be/status + + build: + name: Build and Push + runs-on: ubuntu-amd64 + needs: wake + container: + image: gitea.seeseepuff.be/archlinux/archlinux:latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Ensure image is up-to-date + run: | + sudo pacman -Syu --noconfirm + + - name: Build package + run: | + makepkg -s --noconfirm - + + - name: Push to repository + run: | + makepkg --packagelist | while read -r file; do + curl --user ${{ secrets.USERNAME }}:${{ secrets.PASSWORD }} \ + --upload-file $file \ + https://gitea.seeseepuff.be/api/packages/archlinux/arch/personal + done