35 lines
1.1 KiB
YAML
35 lines
1.1 KiB
YAML
name: Build Container Image
|
|
on: [ push ]
|
|
jobs:
|
|
image:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
DOCKER: podman
|
|
IMAGE_PREFIX: quay.io/ldcraft
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Upgrade Podman
|
|
uses: gacts/install-podman@v1
|
|
# reference: https://github.com/containers/podman/discussions/17868
|
|
- name: Tar as root
|
|
run: |
|
|
sudo mv -fv /usr/bin/tar /usr/bin/tar.orig
|
|
echo -e '#!/bin/sh\n\nsudo /usr/bin/tar.orig "$@"' | sudo tee -a /usr/bin/tar
|
|
sudo chmod +x /usr/bin/tar
|
|
- name: Cache Podman
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.local/share/containers
|
|
~/.config/containers
|
|
key: ${{ runner.os }}-${{ hashFiles('**/*.Dockerfile', 'build_image.sh') }}
|
|
- name: Login to Container Registry
|
|
uses: redhat-actions/podman-login@v1
|
|
with:
|
|
registry: quay.io
|
|
username: ${{ secrets.CONTAINER_USERNAME }}
|
|
password: ${{ secrets.CONTAINER_PASSWORD }}
|
|
- name: Build UI Image
|
|
run: ./build_image.sh rootfs
|