mirror of
https://github.com/zoriya/flood.git
synced 2026-05-28 01:21:25 +00:00
dist/archlinux: add CI that pushes to AUR
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
name: Distribute for Arch Linux
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_run:
|
||||
workflows: ['Release']
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
aur:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Update PKGBUILD for AUR
|
||||
run: |
|
||||
sed -i 's/pkgname=flood/pkgname=nodejs-flood/' ./distribution/archlinux/flood/PKGBUILD
|
||||
sed -i 's/replace-with-your-name/Jesse Chan/' ./distribution/archlinux/flood/PKGBUILD
|
||||
sed -i 's/to-be-determined@tbd/jc@linux.com/' ./distribution/archlinux/flood/PKGBUILD
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Publish to AUR
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
build-args: |
|
||||
AUR_FINGERPRINT="aur.archlinux.org ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBLMiLrP8pVi5BFX2i3vepSUnpedeiewE5XptnUnau+ZoeUOPkpoCgZZuYfpaIQfhhJJI5qgnjJmr4hyJbe/zxow="
|
||||
AUR_FOLDER=./flood
|
||||
AUR_REPO=ssh://aur@aur.archlinux.org/nodejs-flood.git
|
||||
AUR_USER="jesec"
|
||||
COMMIT_USERNAME="github-actions[bot]"
|
||||
COMMIT_EMAIL="41898282+github-actions[bot]@users.noreply.github.com"
|
||||
COMMIT_MESSAGE="Automatic update"
|
||||
"AUR_KEY=${{ secrets.AUR_KEY }}"
|
||||
context: ./distribution/archlinux
|
||||
file: ./distribution/archlinux/Dockerfile.aur
|
||||
platforms: linux/amd64
|
||||
@@ -0,0 +1,40 @@
|
||||
FROM archlinux
|
||||
|
||||
ARG AUR_FINGERPRINT
|
||||
ARG AUR_FOLDER
|
||||
ARG AUR_REPO
|
||||
ARG AUR_KEY
|
||||
ARG AUR_USER
|
||||
ARG COMMIT_USERNAME
|
||||
ARG COMMIT_EMAIL
|
||||
ARG COMMIT_MESSAGE
|
||||
|
||||
RUN pacman -Sy --noconfirm base-devel openssh git pacman-contrib
|
||||
|
||||
RUN useradd -m ${AUR_USER}
|
||||
|
||||
USER ${AUR_USER}
|
||||
|
||||
WORKDIR /home/${AUR_USER}
|
||||
|
||||
RUN mkdir .ssh
|
||||
RUN echo "${AUR_FINGERPRINT}" > .ssh/known_hosts
|
||||
RUN echo "${AUR_KEY}" > .ssh/id_rsa
|
||||
RUN chmod 0400 .ssh/id_rsa
|
||||
|
||||
RUN git config --global user.name ${COMMIT_USERNAME}
|
||||
RUN git config --global user.email ${COMMIT_EMAIL}
|
||||
RUN git clone ${AUR_REPO} aur
|
||||
|
||||
WORKDIR /home/${AUR_USER}/aur
|
||||
|
||||
RUN rm -rf *
|
||||
COPY --chown=${AUR_USER}:${AUR_USER} ${AUR_FOLDER}/* ./
|
||||
RUN ls -la
|
||||
|
||||
RUN updpkgsums
|
||||
RUN makepkg --printsrcinfo > .SRCINFO
|
||||
|
||||
RUN git add .
|
||||
RUN git diff --staged --quiet || git commit -m "${COMMIT_MESSAGE}"
|
||||
RUN git push
|
||||
@@ -6,6 +6,6 @@ Tools used for installation: `pacman`
|
||||
|
||||
`flood` folder contains a working `PKGBUILD`, inspired by [nodejs-yaml](https://github.com/archlinux/svntogit-community/blob/packages/nodejs-yaml/trunk/PKGBUILD) and [nodejs-nativefier](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=nodejs-nativefier). It uses Node.js runtime of system. It complies with Arch Linux package guidelines and should be suitable for submission to Arch Linux official repository.
|
||||
|
||||
An upcoming CI will automatically push new releases to AUR (Arch User Repository).
|
||||
A CI automatically push new releases to AUR (Arch User Repository).
|
||||
|
||||
Note that checksum is not included in the file. Update it with `updpkgsums` when necessary.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
*.tgz
|
||||
@@ -1,10 +1,10 @@
|
||||
# Maintainer: replace with your name <to-be-determined@tbd>
|
||||
# Contributor: replace with your name <to-be-determined@tbd>
|
||||
# Maintainer: replace-with-your-name <to-be-determined@tbd>
|
||||
# Contributor: replace-with-your-name <to-be-determined@tbd>
|
||||
_npmname=flood
|
||||
_npmver=4.3.1
|
||||
_npmver=4.4.0
|
||||
pkgname=flood
|
||||
pkgver=$_npmver
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
pkgdesc="A modern web UI for various torrent clients"
|
||||
arch=(any)
|
||||
url="https://flood.js.org"
|
||||
|
||||
Reference in New Issue
Block a user