add build action
This commit is contained in:
56
.gitea/workflows/build.yaml
Normal file
56
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,56 @@
|
||||
name: Container Build
|
||||
run-name: ${{ gitea.actor }} Building image ${{ gitea.repository }}
|
||||
on: [push]
|
||||
|
||||
|
||||
jobs:
|
||||
build-arm64:
|
||||
runs-on: linux-arm64
|
||||
steps:
|
||||
- uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ gitea.repository }}
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Kaniko build
|
||||
id: kaniko
|
||||
uses: aevea/action-kaniko@master
|
||||
with:
|
||||
image: ${{ gitea.repository }}-arm64
|
||||
registry: registry.cool.de
|
||||
username: ${{ secrets.registry_user }}
|
||||
password: ${{ secrets.registry_password }}
|
||||
tag: latest
|
||||
|
||||
build-amd64:
|
||||
runs-on: linux-amd64
|
||||
steps:
|
||||
- uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ gitea.repository }}
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.git_token }}
|
||||
|
||||
- name: Kaniko build
|
||||
id: kaniko
|
||||
uses: aevea/action-kaniko@master
|
||||
with:
|
||||
image: ${{ gitea.repository }}-amd64
|
||||
registry: registry.cool.de
|
||||
username: ${{ secrets.registry_user }}
|
||||
password: ${{ secrets.registry_password }}
|
||||
tag: latest
|
||||
|
||||
|
||||
manifest:
|
||||
needs: [build-arm64,build-amd64]
|
||||
runs-on: go-arm64
|
||||
steps:
|
||||
- name: build manifest tool & push image
|
||||
run: |
|
||||
git clone https://github.com/estesp/manifest-tool
|
||||
cd manifest-tool && make binary
|
||||
./manifest-tool --username ${{ secrets.registry_user }} --password ${{ secrets.registry_password }} push from-args --platforms linux/arm64,linux/amd64 --template registry.cool.de/${{ gitea.repository }}-ARCH:latest --target registry.cool.de/${{ gitea.repository }} --tags latest
|
||||
Reference in New Issue
Block a user