feat(ci): build image
This commit is contained in:
parent
7605219974
commit
a27d1a9d4b
1 changed files with 42 additions and 0 deletions
42
.forgejo/workflows/build.yaml
Normal file
42
.forgejo/workflows/build.yaml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "*"
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: quay.io/buildah/stable
|
||||||
|
steps:
|
||||||
|
- name: Git clone and checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Container generate metadata
|
||||||
|
uses: https://github.com/docker/metadata-action@v5
|
||||||
|
id: meta
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
codeberg.org/${{ github.repository }}
|
||||||
|
tags: |
|
||||||
|
type=schedule
|
||||||
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
type=semver,pattern={{major}}
|
||||||
|
|
||||||
|
- name: Container-Registry login
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: codeberg.org/wrenix
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Container build
|
||||||
|
uses: https://github.com/redhat-actions/buildah-build@v2
|
||||||
|
with:
|
||||||
|
oci: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
Loading…
Add table
Reference in a new issue