diff --git a/.gitea/workflows/release-nightly.yml b/.gitea/workflows/release-nightly.yml index d6afae9..facd016 100644 --- a/.gitea/workflows/release-nightly.yml +++ b/.gitea/workflows/release-nightly.yml @@ -9,6 +9,7 @@ on: jobs: goreleaser: runs-on: ubuntu-latest + if: false # not implemented on this instance steps: - uses: actions/checkout@v4 with: @@ -36,7 +37,6 @@ jobs: container: image: catthehacker/ubuntu:act-latest env: - DOCKER_ORG: gitea DOCKER_LATEST: nightly steps: - name: Checkout @@ -53,6 +53,7 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v3 with: + registry: ${{ github.server_url }} username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} @@ -72,7 +73,7 @@ jobs: linux/arm64 push: true tags: | - ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }} + ${{ github.server_url }}/${{ github.repository }}:${{ env.DOCKER_LATEST }} - name: Build and push dind-rootless uses: docker/build-push-action@v5 @@ -86,4 +87,4 @@ jobs: linux/arm64 push: true tags: | - ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}-dind-rootless + ${{ github.server_url }}/${{ github.repository }}:${{ env.DOCKER_LATEST }}-dind-rootless diff --git a/.gitea/workflows/release-tag.yml b/.gitea/workflows/release-tag.yml index 58469a0..f0a1a89 100644 --- a/.gitea/workflows/release-tag.yml +++ b/.gitea/workflows/release-tag.yml @@ -8,6 +8,7 @@ on: jobs: goreleaser: runs-on: ubuntu-latest + if: false # disabled as goreleaser is not implemented on my instance steps: - uses: actions/checkout@v4 with: @@ -43,7 +44,6 @@ jobs: container: image: catthehacker/ubuntu:act-latest env: - DOCKER_ORG: gitea DOCKER_LATEST: latest steps: - name: Checkout @@ -57,9 +57,16 @@ jobs: - name: Set up Docker BuildX uses: docker/setup-buildx-action@v3 + - name: determine local registry domain + shell: bash + run: | + echo REGISTRY=$(echo ${GITHUB_SERVER_URL} | awk -F[/:] '{print $4}') >> $GITHUB_ENV + echo "::set-output name=REGISTRY::$REGISTRY" + - name: Login to DockerHub uses: docker/login-action@v3 with: + registry: ${{ github.server_url }} username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} @@ -79,8 +86,8 @@ jobs: linux/arm64 push: true tags: | - ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }} - ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }} + ${{ env.REGISTRY }}/${{ github.repository }}:${{ steps.meta.outputs.REPO_VERSION }} + ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.DOCKER_LATEST }} - name: Build and push dind-rootless uses: docker/build-push-action@v5 @@ -94,5 +101,5 @@ jobs: linux/arm64 push: true tags: | - ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-dind-rootless - ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}-dind-rootless + ${{ github.server_url }}/${{ github.repository }}:${{ steps.meta.outputs.REPO_VERSION }}-dind-rootless + ${{ github.server_url }}/${{ github.repository }}:${{ env.DOCKER_LATEST }}-dind-rootless diff --git a/internal/app/run/runner.go b/internal/app/run/runner.go index d0246bc..f4289b8 100644 --- a/internal/app/run/runner.go +++ b/internal/app/run/runner.go @@ -157,6 +157,7 @@ func (r *Runner) run(ctx context.Context, task *runnerv1.Task, reporter *report. Token: taskContext["token"].GetStringValue(), RepositoryOwner: taskContext["repository_owner"].GetStringValue(), RetentionDays: taskContext["retention_days"].GetStringValue(), + ServerURL: taskContext["server_url"].GetStringValue(), } if t := task.Secrets["GITEA_TOKEN"]; t != "" { preset.Token = t