From f3d1b591736e5c47176a184d54db456f9628690c Mon Sep 17 00:00:00 2001 From: Fei1Yang Date: Sat, 29 Oct 2022 18:01:11 +0800 Subject: [PATCH] Update container action --- .github/workflows/docker.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 282f3a4d..23f99f1d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -15,6 +15,8 @@ jobs: uses: actions/checkout@v2 - name: Setup Docker Buildx uses: docker/setup-buildx-action@v1 + - name: Setup QEMU for Docker Buildx + uses: docker/setup-qemu-action@v2 - name: Login to GitHub Container Registry uses: docker/login-action@v1 with: @@ -29,15 +31,18 @@ jobs: - name: Get tag to build id: tag run: | + echo "latest=ghcr.io/sagernet/sing-box:latest" >> $GITHUB_OUTPUT if [[ -z "${{ github.event.inputs.tag }}" ]]; then - echo ::set-output name=tag::ghcr.io/sagernet/sing-box:${{ github.ref_name }} + echo "versioned=ghcr.io/sagernet/sing-box:${{ github.ref_name }}" >> $GITHUB_OUTPUT else - echo ::set-output name=tag::ghcr.io/sagernet/sing-box:${{ github.event.inputs.tag }} + echo "versioned=ghcr.io/sagernet/sing-box:${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT fi - name: Build and release Docker images uses: docker/build-push-action@v2 with: platforms: linux/386,linux/amd64,linux/arm64,linux/s390x target: dist - tags: ${{ steps.tag.outputs.tag }} + tags: | + ${{ steps.tag.outputs.latest }} + ${{ steps.tag.outputs.versioned }} push: true