mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
ci: change ghcr.io/coder/coder-preview:main tag to use version names (#8938)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user