docker hub integration

This commit is contained in:
Evgenii Alekseev 2022-03-13 23:55:21 +03:00
parent 046febc440
commit 93406483fe
5 changed files with 41 additions and 6 deletions

29
.github/workflows/docker-image.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: docker image
on:
push:
branches: [ master ]
jobs:
docker-image:
runs-on: ubuntu-latest
steps:
- name: setup QEMU
uses: docker/setup-qemu-action@v1
- name: setup docker buildx
uses: docker/setup-buildx-action@v1
- name: login to docker hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build an image and push
uses: docker/build-push-action@v2
with:
push: true
tags: arcan1s/ahriman:latest

View File

@ -12,20 +12,24 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: extract version
id: version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: create changelog
id: changelog
uses: jaywcjlove/changelog-generator@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
filter: 'Release \d+\.\d+\.\d+'
- name: create archive
run: make archive
env:
VERSION: ${{ steps.version.outputs.VERSION }}
- name: Release
- name: release
uses: softprops/action-gh-release@v1
with:
body: |

View File

@ -13,6 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: setup the service in arch linux container
run: |
docker run \

View File

@ -13,6 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: run check and tests in arch linux container
run: |
docker run \

View File

@ -35,12 +35,12 @@ RUN runuser -u build -- yay --noconfirm -Sy devtools git pyalpm python-inflectio
## copy tree
COPY --chown=build . "/home/build/ahriman"
## create package archive and install it
RUN cd /home/build/ahriman && \
make VERSION="$(git describe --tags --abbrev=0)" archlinux && \
cp ./*-src.tar.xz package/archlinux && \
cd package/archlinux && \
RUN cd "/home/build/ahriman" && \
make VERSION=$(python -c "from src.ahriman.version import __version__; print(__version__)") archlinux && \
cp ./*-src.tar.xz "package/archlinux" && \
cd "package/archlinux" && \
runuser -u build -- makepkg --noconfirm --install --skipchecksums && \
cd - && rm -r /home/build/ahriman
cd - && rm -r "/home/build/ahriman"
VOLUME ["/var/lib/ahriman"]