Add .forgejo/workflows/docker-build.yml #2
1 changed files with 14 additions and 30 deletions
|
@ -36,38 +36,22 @@ jobs:
|
|||
git tag "${{ steps.version.outputs.version }}" -m "[forgejo-action-tag]"
|
||||
git push origin --tags
|
||||
|
||||
docker-build:
|
||||
webserver:
|
||||
runs-on: host
|
||||
needs:
|
||||
- release
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- alpine-php8-webserver
|
||||
- alpine-php8-cron-webserver
|
||||
needs: release
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Build Webserver
|
||||
uses: ./.github/workflows/docker-build.yml
|
||||
with:
|
||||
github-server-url: https://git.h2-invent.com
|
||||
repository: Public-System-Design/${{ matrix.repo }}
|
||||
ref: main
|
||||
path: ${{ matrix.repo }}
|
||||
repo_name: alpine-php8-webserver
|
||||
version: ${{ needs.release.outputs.version }}
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
cron:
|
||||
runs-on: host
|
||||
needs: webserver
|
||||
steps:
|
||||
- name: Build Cron-Webserver
|
||||
uses: ./.github/workflows/docker-build.yml
|
||||
with:
|
||||
registry: git.h2-invent.com
|
||||
username: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_USER }}
|
||||
password: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_KEY }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./${{ matrix.repo }}
|
||||
push: true
|
||||
tags: |
|
||||
git.h2-invent.com/public-system-design/${{ matrix.repo }}:${{ needs.release.outputs.version }}
|
||||
git.h2-invent.com/public-system-design/${{ matrix.repo }}:latest
|
||||
build-args: |
|
||||
VERSION=${{ needs.release.outputs.version }}
|
||||
repo_name: alpine-php8-cron-webserver
|
||||
version: ${{ needs.release.outputs.version }}
|
||||
|
|
Loading…
Add table
Reference in a new issue