Enhanced forgejo build pipeline
This commit is contained in:
parent
0da744db72
commit
5f514fdd5f
1 changed files with 20 additions and 10 deletions
30
.github/workflows/.github-ci.yaml
vendored
30
.github/workflows/.github-ci.yaml
vendored
|
@ -1,27 +1,37 @@
|
||||||
name: ci-workflow
|
name: ci
|
||||||
|
|
||||||
on: [push]
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
docker:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Repository meta
|
||||||
|
id: repository
|
||||||
|
run: |
|
||||||
|
registry=${{ github.server_url }}
|
||||||
|
registry=${registry##http*://}
|
||||||
|
echo "registry=${registry}" >> "$GITHUB_OUTPUT"
|
||||||
|
repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
echo "repository=${repository}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
id: meta
|
id: docker
|
||||||
with:
|
with:
|
||||||
images: gitea.runner.c-one-infra.de/giteaadmin/fibonacci_go
|
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build and push
|
||||||
uses: https://codeberg.org/umglurf/kaniko-action@main
|
uses: https://codeberg.org/umglurf/kaniko-action@main
|
||||||
with:
|
with:
|
||||||
credentials: |
|
credentials: |
|
||||||
gitea.runner.c-one-infra.de=giteaAdmin:${{ secrets.PACKAGES_TOKEN }}
|
${{ steps.repository.outputs.registry }}=${{ github.repository }}:${{ secrets.PACKAGES_TOKEN }}
|
||||||
destinations: |
|
destinations: |
|
||||||
${{ steps.meta.outputs.tags }}
|
${{ steps.docker.outputs.tags }}
|
||||||
# push: ${{ github.event_name != 'pull_request' }}
|
# push: ${{ github.event_name != 'pull_request' }}
|
||||||
push: 'true'
|
push: 'true'
|
||||||
|
|
Loading…
Reference in a new issue