add gitea-runner, rework ci workflow
This commit is contained in:
parent
604e65d234
commit
ced51b9d8e
4 changed files with 163 additions and 44 deletions
|
@ -1,40 +0,0 @@
|
|||
name: Build images
|
||||
run-name: Build images
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
schedule:
|
||||
- cron: '30 5 */5 * *'
|
||||
|
||||
jobs:
|
||||
build-images:
|
||||
runs-on: [ linux_amd64, ubuntu-latest ]
|
||||
steps:
|
||||
- name: install actions deps
|
||||
run: |
|
||||
dnf install -y nodejs git
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Build selected images
|
||||
run: |
|
||||
podman build ./system-toolbox --tag system-toolbox:latest
|
||||
podman build ./cloud-toolbox --tag cloud-toolbox:latest
|
||||
podman build ./tor --tag tor:latest
|
||||
podman build ./wireguard --tag wireguard:latest
|
||||
podman build ./zabbix-agent --tag zabbix-agent:latest
|
||||
- name: login to registry
|
||||
run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" gitea.maciej.cloud
|
||||
- name: Push image
|
||||
run: |
|
||||
# tagging
|
||||
podman tag system-toolbox:latest gitea.maciej.cloud/packages/system-toolbox:latest
|
||||
podman tag cloud-toolbox:latest gitea.maciej.cloud/packages/cloud-toolbox:latest
|
||||
podman tag tor:latest gitea.maciej.cloud/packages/tor:latest
|
||||
podman tag wireguard:latest gitea.maciej.cloud/packages/wireguard:latest
|
||||
podman tag zabbix-agent:latest gitea.maciej.cloud/packages/zabbix-agent:latest
|
||||
# pushing
|
||||
podman push gitea.maciej.cloud/packages/system-toolbox:latest
|
||||
podman push gitea.maciej.cloud/packages/cloud-toolbox:latest
|
||||
podman push gitea.maciej.cloud/packages/tor:latest
|
||||
podman push gitea.maciej.cloud/packages/wireguard:latest
|
||||
podman push gitea.maciej.cloud/packages/zabbix-agent:latest
|
66
.gitea/workflows/build-images.yml
Normal file
66
.gitea/workflows/build-images.yml
Normal file
|
@ -0,0 +1,66 @@
|
|||
name: Build images
|
||||
run-name: Build images
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
schedule:
|
||||
- cron: '30 5 */5 * *'
|
||||
|
||||
jobs:
|
||||
build-images-arm64:
|
||||
runs-on: [ linux_arm64 ]
|
||||
steps:
|
||||
- name: install actions deps
|
||||
run: |
|
||||
dnf install -y nodejs git
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: login to registry
|
||||
run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" gitea.maciej.cloud
|
||||
- name: Build selected images
|
||||
run: |
|
||||
IMAGES=(system-toolbox cloud-toolbox tor wireguard zabbix-agent);
|
||||
for image in "${IMAGES[@]}";
|
||||
do
|
||||
echo "building image $image";
|
||||
podman build ./$image --tag gitea.maciej.cloud/packages/$image:arm64;
|
||||
echo "pushing image $image";
|
||||
podman push gitea.maciej.cloud/packages/$image:arm64;
|
||||
done
|
||||
build-images-amd64:
|
||||
runs-on: [ linux_amd64 ]
|
||||
steps:
|
||||
- name: install actions deps
|
||||
run: |
|
||||
dnf install -y nodejs git
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: login to registry
|
||||
run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" gitea.maciej.cloud
|
||||
- name: Build selected images
|
||||
run: |
|
||||
IMAGES=(system-toolbox cloud-toolbox tor wireguard zabbix-agent);
|
||||
for image in "${IMAGES[@]}";
|
||||
do
|
||||
echo "building image $image";
|
||||
podman build ./$image --tag gitea.maciej.cloud/packages/$image:amd64;
|
||||
echo "pushing image $image";
|
||||
podman push gitea.maciej.cloud/packages/$image:amd64;
|
||||
done
|
||||
update-images-manifests:
|
||||
runs-on: [ linux_amd64 ]
|
||||
needs:
|
||||
- build-images-amd64
|
||||
- build-images-arm64
|
||||
steps:
|
||||
- name: login to registry
|
||||
run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" gitea.maciej.cloud
|
||||
- name: Create manifests and push
|
||||
run: |
|
||||
IMAGES=(system-toolbox cloud-toolbox tor wireguard zabbix-agent);
|
||||
for image in "${IMAGES[@]}";
|
||||
do
|
||||
echo "Updating manifest for $image";
|
||||
podman manifest create gitea.maciej.cloud/packages/$image:latest gitea.maciej.cloud/packages/$image:amd64 gitea.maciej.cloud/packages/$image:arm64;
|
||||
podman manifest push gitea.maciej.cloud/packages/$image:latest gitea.maciej.cloud/packages/$image:latest;
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue