From 523b49acb11d2d4f41a5c3dd841e5bb53bf8a0d7 Mon Sep 17 00:00:00 2001 From: holzi1005 Date: Sun, 22 Jun 2025 14:45:30 +0200 Subject: [PATCH] Update .forgejo/workflows/build.yml --- .forgejo/workflows/build.yml | 68 +++++++++++++++++++++++++++++++----- 1 file changed, 59 insertions(+), 9 deletions(-) diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index 54694a4..b1a3b82 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -36,20 +36,70 @@ jobs: git tag "${{ steps.version.outputs.version }}" -m "[forgejo-action-tag]" git push origin --tags + webserver: + env: + REPO_NAME: alpine-php8-webserver needs: - release - uses: ./.forgejo/workflows/docker-build.yml - with: - repo_name: alpine-php8-webserver + outputs: version: ${{ needs.release.outputs.version }} + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + github-server-url: https://git.h2-invent.com + repository: Public-System-Design/${{ env.REPO_NAME }} + ref: main + path: ${{ env.REPO_NAME }} - cron: + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + registry: git.h2-invent.com + username: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_USER }} + password: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_KEY }} + + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + context: ./${{ env.REPO_NAME }} + push: true + tags: | + git.h2-invent.com/public-system-design/${{ env.REPO_NAME }}:${{ needs.release.outputs.version }} + git.h2-invent.com/public-system-design/${{ env.REPO_NAME }}:latest + build-args: | + VERSION=${{ needs.release.outputs.version }} + + webserver: + env: + REPO_NAME: alpine-php8-cron-webserver needs: - - release - webserver - uses: ./.forgejo/workflows/docker-build.yml - with: - repo_name: alpine-php8-cron-webserver - version: ${{ needs.release.outputs.version }} + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + github-server-url: https://git.h2-invent.com + repository: Public-System-Design/${{ env.REPO_NAME }} + ref: main + path: ${{ env.REPO_NAME }} + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + registry: git.h2-invent.com + username: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_USER }} + password: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_KEY }} + + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + context: ./${{ env.REPO_NAME }} + push: true + tags: | + git.h2-invent.com/public-system-design/${{ env.REPO_NAME }}:${{ needs.webserver.outputs.version }} + git.h2-invent.com/public-system-design/${{ env.REPO_NAME }}:latest + build-args: | + VERSION=${{ needs.webserver.outputs.version }}