From 320eaefd09f1ebf203c61c6666063b48bef4e708 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 15:32:54 +0200 Subject: [PATCH] Use forgejo-build-publish instead --- .forgejo/workflows/upload.yml | 39 +++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/.forgejo/workflows/upload.yml b/.forgejo/workflows/upload.yml index 4e168b1..5a8e636 100644 --- a/.forgejo/workflows/upload.yml +++ b/.forgejo/workflows/upload.yml @@ -11,22 +11,25 @@ jobs: upload: runs-on: docker steps: - - name: Setup system - run: | - apt update - apt upgrade -y - apt install -y docker - - name: Set up QEMU - uses: https://code.forgejo.org/docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: https://code.forgejo.org/docker/setup-buildx-action@v3 - - name: Login to StarOpenSource Git - uses: https://code.forgejo.org/docker/login-action@v3 + - name: Build container + uses: https://code.forgejo.org/forgejo/forgejo-build-publish/build@v1 with: - username: ${{ secrets.REGISTRY_USERNAME }} - password: ${{ secrets.REGISTRY_TOKEN }} - - name: Build and push - uses: https://code.forgejo.org/docker/build-push-action@v6 - with: - push: true - tags: staropensource/actions-docker:latest + forgejo: "${{ env.GITHUB_SERVER_URL }}" + owner: "${{ env.GITHUB_REPOSITORY_OWNER }}" + repository: "${{ steps.repository.outputs.value }}" + doer: "${{ secrets.REGISTRY_USERNAME }}" + token: "${{ secrets.REGISTRY_TOKEN }}" + tag-version: "latest" + platforms: linux/amd64 + binary-name: sh + binary-path: /bin/sh + dockerfile: Dockerfile + - name: Publish container + uses: https://code.forgejo.org/forgejo/forgejo-build-publish/publish@v1 + with: + from-forgejo: "${{ env.GITHUB_SERVER_URL }}" + from-owner: "${{ env.GITHUB_REPOSITORY_OWNER }}" + to-forgejo: "${{ env.GITHUB_SERVER_URL }}" + to-owner: "${{ env.GITHUB_REPOSITORY_OWNER }}" + to-doer: "${{ secrets.REGISTRY_USERNAME }}" + to-token: "${{ secrets.REGISTRY_TOKEN }}"