Skip to content

Commit 38fe278

Browse files
committed
Merge branch 'main' of https://github.com/coder/coder into dependabot/npm_and_yarn/site/chart.js-4.3.3
2 parents 5a331da + e0f644c commit 38fe278

File tree

220 files changed

+7914
-1805
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+7914
-1805
lines changed

.github/actions/setup-go/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: |
44
inputs:
55
version:
66
description: "The Go version to use."
7-
default: "1.20.6"
7+
default: "1.20.7"
88
runs:
99
using: "composite"
1010
steps:

.github/workflows/ci.yaml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ jobs:
137137
138138
# Check for any typos
139139
- name: Check for typos
140-
uses: crate-ci/typos@v1.16.1
140+
uses: crate-ci/typos@v1.16.2
141141
with:
142142
config: .github/workflows/typos.toml
143143

@@ -224,7 +224,7 @@ jobs:
224224
with:
225225
# This doesn't need caching. It's super fast anyways!
226226
cache: false
227-
go-version: 1.20.6
227+
go-version: 1.20.7
228228

229229
- name: Install shfmt
230230
run: go install mvdan.cc/sh/v3/cmd/shfmt@v3.5.0
@@ -668,6 +668,7 @@ jobs:
668668
- test-go-pg
669669
- test-go-race
670670
- test-js
671+
- test-e2e
671672
- offlinedocs
672673
# Allow this job to run even if the needed jobs fail, are skipped or
673674
# cancelled.
@@ -724,6 +725,7 @@ jobs:
724725
password: ${{ secrets.GITHUB_TOKEN }}
725726

726727
- name: Build and push Linux amd64 Docker image
728+
id: build_and_push
727729
run: |
728730
set -euxo pipefail
729731
go mod download
@@ -738,3 +740,19 @@ jobs:
738740
--version $version \
739741
--push \
740742
build/coder_linux_amd64
743+
744+
# Tag image with new package tag and push
745+
tag=$(echo "$version" | sed 's/+/-/g')
746+
docker tag ghcr.io/coder/coder-preview:main ghcr.io/coder/coder-preview:main-$tag
747+
docker push ghcr.io/coder/coder-preview:main-$tag
748+
749+
- name: Prune old images
750+
uses: vlaurin/action-ghcr-prune@v0.5.0
751+
with:
752+
token: ${{ secrets.GITHUB_TOKEN }}
753+
organization: coder
754+
container: coder-preview
755+
keep-younger-than: 7 # days
756+
keep-tags-regexes: ^pr
757+
prune-tags-regexes: ^main-
758+
prune-untagged: true

.github/workflows/pr-cleanup.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Cleanup PR deployment and image
22
on:
33
pull_request:
4-
types: [closed]
4+
types: closed
55
workflow_dispatch:
66
inputs:
77
pr_number:
@@ -63,5 +63,18 @@ jobs:
6363
(
6464
curl -X DELETE "https://api.cloudflare.com/client/v4/zones/${{ secrets.PR_DEPLOYMENTS_ZONE_ID }}/dns_records/$record_id" \
6565
-H "Authorization: Bearer ${{ secrets.PR_DEPLOYMENTS_CLOUDFLARE_API_TOKEN }}" \
66-
-H "Content-Type:application/json"
66+
-H "Content-Type:application/json" | jq -r '.success'
6767
) || echo "DNS record not found"
68+
69+
- name: "Delete certificate"
70+
if: ${{ github.event.pull_request.merged == true }}
71+
run: |
72+
set -euxo pipefail
73+
kubectl delete certificate "pr${{ steps.pr_number.outputs.PR_NUMBER }}-tls" -n pr-deployment-certs || echo "certificate not found"
74+
75+
- name: Delete PR Comments
76+
uses: izhangzhihao/delete-comment@master
77+
with:
78+
github_token: ${{ secrets.GITHUB_TOKEN }}
79+
delete_user_name: github-actions[bot]
80+
issue_number: ${{ github.event.number }}

0 commit comments

Comments
 (0)