From a3e686a63382e8fda0fac79d9b0b1a35f145d739 Mon Sep 17 00:00:00 2001 From: huanghs Date: Mon, 21 Oct 2024 18:45:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/actions/action-dock?= =?UTF-8?q?er-build-push/action.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../action-docker-build-push/action.yml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/.gitea/actions/action-docker-build-push/action.yml b/.gitea/actions/action-docker-build-push/action.yml index 394af32..1b26679 100644 --- a/.gitea/actions/action-docker-build-push/action.yml +++ b/.gitea/actions/action-docker-build-push/action.yml @@ -66,14 +66,7 @@ runs: run: echo -e "\n[$(date +'%Y-%m-%d %H:%M:%S')] ⚙️ Set up Docker BuildX" - name: Set up Docker BuildX - uses: docker/setup-buildx-action@v3.7.1 - env: - HTTP_PROXY: ${{ env.http_proxy }} - HTTPS_PROXY: ${{ env.https_proxy }} - NO_PROXY: ${{ env.no_proxy }} - http_proxy: ${{ env.http_proxy }} - https_proxy: ${{ env.https_proxy }} - no_proxy: ${{ env.no_proxy }} + uses: docker/setup-buildx-action@v3 with: driver-opts: | env.http_proxy=${{ env.http_proxy }} @@ -131,13 +124,6 @@ runs: - name: Build and push uses: docker/build-push-action@v6 - env: - HTTP_PROXY: ${{ env.http_proxy }} - HTTPS_PROXY: ${{ env.https_proxy }} - NO_PROXY: ${{ env.no_proxy }} - http_proxy: ${{ env.http_proxy }} - https_proxy: ${{ env.https_proxy }} - no_proxy: ${{ env.no_proxy }} with: context: ${{ inputs.context }} file: ${{ inputs.file }} @@ -147,3 +133,6 @@ runs: labels: ${{ inputs.labels }} cache-from: type=local,src=/opt/docker-cache/.build-cache cache-to: type=local,dest=/opt/docker-cache/.build-cache,mode=max + build-args: | + "http_proxy=${{ env.http_proxy }}" + "https_proxy=${{ env.http_proxy }}"