Skip to content

Scheduled Publish

Scheduled Publish #150

name: Scheduled Publish
on:
schedule:
- cron: '30 22 * * */7'
workflow_dispatch:
env:
NOVNC_IMG: novnc
BASE_DEVEL_IMG: base-devel
LATEST_IMG: latest
BASE_IMG: base
jobs:
# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
publish:
runs-on: ubuntu-latest
container:
image: docker.io/blackarchlinux/blackarch:base-devel
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo pacman-key --init && \
sudo pacman-key --populate archlinux blackarch && \
sudo pacman -Sy --noconfirm --needed archlinux-keyring blackarch-keyring && \
sudo pacman -Syu --noconfirm --needed make docker devtools fakeroot fakechroot
- name: Build base
run: |
make blackarch-base
docker tag blackarchlinux/blackarch:base docker.io/blackarchlinux/blackarch:$BASE_IMG
docker tag blackarchlinux/blackarch:base docker.io/blackarchlinux/blackarch:$LATEST_IMG
- name: Build base-devel
run: |
make blackarch-base-devel
docker tag blackarchlinux/blackarch:base-devel docker.io/blackarchlinux/blackarch:$BASE_DEVEL_IMG
- name: Build novnc
run: |
docker build ./blackarch-novnc --file ./blackarch-novnc/Dockerfile --tag docker.io/blackarchlinux/blackarch:$NOVNC_IMG
- name: Log into registry
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Push image
run: |
docker push docker.io/blackarchlinux/blackarch:$NOVNC_IMG
docker push docker.io/blackarchlinux/blackarch:$BASE_IMG
docker push docker.io/blackarchlinux/blackarch:$BASE_DEVEL_IMG
docker push docker.io/blackarchlinux/blackarch:$LATEST_IMG