mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 23:37:18 +00:00
ci: create regress job
This commit is contained in:
parent
7c7804a9f4
commit
d63950be19
74
.github/workflows/regress.yml
vendored
Normal file
74
.github/workflows/regress.yml
vendored
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
name: Regress
|
||||||
|
|
||||||
|
on: workflow_dispatch
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run-regress-tests:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
services:
|
||||||
|
ahriman:
|
||||||
|
image: arcan1s/ahriman:edge
|
||||||
|
env:
|
||||||
|
AHRIMAN_PORT: 8080
|
||||||
|
AHRIMAN_UNIX_SOCKET: /var/lib/ahriman/ahriman/ahriman-web.sock
|
||||||
|
options: --privileged --entrypoint entrypoint-web
|
||||||
|
ports:
|
||||||
|
- 8080
|
||||||
|
volumes:
|
||||||
|
- repo:/var/lib/ahriman
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: arcan1s/ahriman:edge
|
||||||
|
env:
|
||||||
|
AHRIMAN_DEBUG: y
|
||||||
|
AHRIMAN_OUTPUT: console
|
||||||
|
AHRIMAN_PORT: 8080
|
||||||
|
AHRIMAN_UNIX_SOCKET: /var/lib/ahriman/ahriman/ahriman-web.sock
|
||||||
|
options: --privileged
|
||||||
|
volumes:
|
||||||
|
- repo:/var/lib/ahriman
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- run: pacman -Sy
|
||||||
|
|
||||||
|
- name: Init repository
|
||||||
|
run: entrypoint help
|
||||||
|
|
||||||
|
- name: Create user
|
||||||
|
run: |
|
||||||
|
sudo -u ahriman ahriman \
|
||||||
|
--log-handler "$AHRIMAN_OUTPUT" \
|
||||||
|
user-add \
|
||||||
|
--packager "github actions <actions@github.com>" \
|
||||||
|
--password ahriman \
|
||||||
|
--role full \
|
||||||
|
ahriman
|
||||||
|
|
||||||
|
- name: Fetch users
|
||||||
|
run: |
|
||||||
|
ahriman \
|
||||||
|
--log-handler "$AHRIMAN_OUTPUT" \
|
||||||
|
user-list \
|
||||||
|
--exit-code
|
||||||
|
|
||||||
|
- name: Add package
|
||||||
|
run: |
|
||||||
|
sudo -u ahriman ahriman \
|
||||||
|
--log-handler "$AHRIMAN_OUTPUT" \
|
||||||
|
package-add \
|
||||||
|
--exit-code \
|
||||||
|
--now \
|
||||||
|
--refresh \
|
||||||
|
ahriman
|
||||||
|
|
||||||
|
- name: Update packages
|
||||||
|
run: |
|
||||||
|
sudo -u ahriman ahriman \
|
||||||
|
--log-handler "$AHRIMAN_OUTPUT" \
|
||||||
|
repo-update \
|
||||||
|
--exit-code \
|
||||||
|
|| true
|
@ -136,6 +136,7 @@ VOLUME ["/var/lib/ahriman"]
|
|||||||
COPY "docker/systemd-nspawn.sh" "/usr/local/bin/systemd-nspawn"
|
COPY "docker/systemd-nspawn.sh" "/usr/local/bin/systemd-nspawn"
|
||||||
## entrypoint setup
|
## entrypoint setup
|
||||||
COPY "docker/entrypoint.sh" "/usr/local/bin/entrypoint"
|
COPY "docker/entrypoint.sh" "/usr/local/bin/entrypoint"
|
||||||
|
COPY "docker/entrypoint-web.sh" "/usr/local/bin/entrypoint-web"
|
||||||
ENTRYPOINT ["entrypoint"]
|
ENTRYPOINT ["entrypoint"]
|
||||||
# default command
|
# default command
|
||||||
CMD ["repo-update", "--refresh"]
|
CMD ["repo-update", "--refresh"]
|
||||||
|
5
docker/entrypoint-web.sh
Executable file
5
docker/entrypoint-web.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Special workaround for running web service in github actions, must not be usually used in real environment,
|
||||||
|
# consider running web command explicitly instead
|
||||||
|
|
||||||
|
exec entrypoint web "$@"
|
Loading…
Reference in New Issue
Block a user