try sharedf workflow
This commit is contained in:
parent
2579d00255
commit
68892d8864
@ -1,31 +1,12 @@
|
|||||||
name: Build Container Image
|
name: Build Multiarch Container Image
|
||||||
on: [push]
|
on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
build-container:
|
call-reusable-workflow:
|
||||||
runs-on: buildah-latest
|
uses: https://new.code.vanwa.ch/container/multiarch-build-workflow/workflow.yml@main
|
||||||
steps:
|
with:
|
||||||
- name: Check out repository code
|
repository: ${{ gitea.repository }}
|
||||||
uses: actions/checkout@v3
|
ref_name: ${{ gitea.ref_name }}
|
||||||
- name: Split branch name
|
sha: ${{ gitea.sha }}
|
||||||
env:
|
registry_url: ${{ secrets.REGISTRY_URL }}
|
||||||
REPO: ${{ gitea.repository }}
|
registry_user: ${{ secrets.REGISTRY_USER }}
|
||||||
id: split
|
registry_pw: ${{ secrets.REGISTRY_PW }}
|
||||||
run: echo "::set-output name=repo_name::${REPO##*/}"
|
|
||||||
- name: Build image
|
|
||||||
id: build-image
|
|
||||||
uses: redhat-actions/buildah-build@v2
|
|
||||||
with:
|
|
||||||
image: ${{ secrets.DOCKERHUB_USER }}/${{ steps.split.outputs.repo_name }}
|
|
||||||
tags: ${{ gitea.ref_name }} ${{ gitea.sha }}
|
|
||||||
archs: arm64, amd64
|
|
||||||
containerfiles: |
|
|
||||||
./Containerfile
|
|
||||||
- name: Push to dockerhub
|
|
||||||
id: push-to-dockerhub
|
|
||||||
uses: redhat-actions/push-to-registry@v2
|
|
||||||
with:
|
|
||||||
image: ${{ steps.build-image.outputs.image }}
|
|
||||||
tags: ${{ steps.build-image.outputs.tags }}
|
|
||||||
registry: docker.io
|
|
||||||
username: ${{ secrets.DOCKERHUB_USER }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_PW }}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user