42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
on: [push]
|
|
|
|
jobs:
|
|
build-image:
|
|
runs-on: docker
|
|
container:
|
|
image: quay.io/podman/stable:v4.9.0
|
|
steps:
|
|
- name: Install additional packages
|
|
run: |
|
|
dnf -y install git nodejs
|
|
|
|
- name: Setup podman
|
|
run: |
|
|
sudo -u podman podman login gitea.angry.im --username PeterCxy --password ${{ secrets.FORGEJO_TOKEN }}
|
|
|
|
- name: Repository Checkout
|
|
uses: https://gitea.angry.im/actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Detect Directory Changes
|
|
id: changed-dirs
|
|
uses: https://gitea.angry.im/actions/changed-files@v42
|
|
with:
|
|
dir_names: 'true'
|
|
dir_names_max_depth: '1'
|
|
dir_names_exclude_current_dir: 'true'
|
|
files_ignore: |
|
|
.forgejo/**
|
|
build-image.sh
|
|
|
|
- name: Build & Push
|
|
if: ${{ steps.changed-dirs.all_changed_files_count != '0' }}
|
|
env:
|
|
ALL_CHANGED_DIRS: ${{ steps.changed-dirs.outputs.all_changed_files }}
|
|
run: |
|
|
for file in ${ALL_CHANGED_DIRS}; do
|
|
echo "---- Building ${file} ----"
|
|
sudo -u podman ./build-image.sh ${file}
|
|
done
|