From 90c1647fcf4dd6f95dd5265cf22f41e4d2aa2438 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Mon, 7 Aug 2023 16:41:20 +0300 Subject: [PATCH] ci: change `ghcr.io/coder/coder-preview:main` tag to use version names (#8938) --- .github/workflows/ci.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3e5838f2a1..7aa367acd3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -701,7 +701,6 @@ jobs: runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }} env: DOCKER_CLI_EXPERIMENTAL: "enabled" - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - name: Checkout uses: actions/checkout@v3 @@ -741,12 +740,9 @@ jobs: --push \ build/coder_linux_amd64 - # Get commit sha to be used as package tag - new_package_tag=$(gh api repos/coder/coder/commits/main | jq -r '.sha[0:7]') - # Tag image with new package tag and push - docker tag ghcr.io/coder/coder-preview:main ghcr.io/coder/coder-preview:main-$new_package_tag - docker push ghcr.io/coder/coder-preview:main-$new_package_tag + docker tag ghcr.io/coder/coder-preview:main ghcr.io/coder/coder-preview:main-$version + docker push ghcr.io/coder/coder-preview:main-$version - name: Prune old images uses: vlaurin/action-ghcr-prune@v0.5.0