Skip to content

Commit 18dd978

Browse files
authored
Merge branch 'main' into rstudio-module
2 parents 976d033 + 7732865 commit 18dd978

File tree

169 files changed

+8563
-1144
lines changed

Some content is hidden

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

169 files changed

+8563
-1144
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../AGENTS.md

.github/dependabot.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "weekly"
7+
groups:
8+
github-actions:
9+
patterns:
10+
- "*"

.github/scripts/version-bump.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ main() {
192192

193193
# Always run formatter to ensure consistent formatting
194194
echo "🔧 Running formatter to ensure consistent formatting..."
195-
if command -v bun >/dev/null 2>&1; then
196-
bun fmt >/dev/null 2>&1 || echo "⚠️ Warning: bun fmt failed, but continuing..."
195+
if command -v bun > /dev/null 2>&1; then
196+
bun fmt > /dev/null 2>&1 || echo "⚠️ Warning: bun fmt failed, but continuing..."
197197
else
198198
echo "⚠️ Warning: bun not found, skipping formatting"
199199
fi

.github/typos.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[default.extend-words]
22
muc = "muc" # For Munich location code
3+
tyo = "tyo" # For Tokyo location code
34
Hashi = "Hashi"
45
HashiCorp = "HashiCorp"
6+
mavrickrishi = "mavrickrishi" # Username
7+
mavrick = "mavrick" # Username
58

69
[files]
710
extend-exclude = ["registry/coder/templates/aws-devcontainer/architecture.svg"] #False positive

.github/workflows/check_registry_site_health.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
steps:
1313
- name: Checkout repository
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v5
1515

1616
- name: Run check.sh
1717
run: |

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Check out code
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
1616
- name: Set up Terraform
1717
uses: coder/coder/.github/actions/setup-tf@main
1818
- name: Set up Bun
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ubuntu-latest
3636
steps:
3737
- name: Check out code
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@v5
3939
- name: Install Bun
4040
uses: oven-sh/setup-bun@v2
4141
with:
@@ -48,7 +48,7 @@ jobs:
4848
- name: Validate formatting
4949
run: bun fmt:ci
5050
- name: Check for typos
51-
uses: crate-ci/[email protected].3
51+
uses: crate-ci/[email protected].5
5252
with:
5353
config: .github/typos.toml
5454
validate-readme-files:
@@ -59,7 +59,7 @@ jobs:
5959
needs: validate-style
6060
steps:
6161
- name: Check out code
62-
uses: actions/checkout@v4
62+
uses: actions/checkout@v5
6363
- name: Set up Go
6464
uses: actions/setup-go@v5
6565
with:

.github/workflows/deploy-registry.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ jobs:
2828

2929
steps:
3030
- name: Checkout code
31-
uses: actions/checkout@v4
31+
uses: actions/checkout@v5
3232
- name: Authenticate with Google Cloud
3333
uses: google-github-actions/auth@b7593ed2efd1c1617e1b0254da33b86225adb2a5
3434
with:
3535
workload_identity_provider: projects/309789351055/locations/global/workloadIdentityPools/github-actions/providers/github
3636
service_account: [email protected]
3737
- name: Set up Google Cloud SDK
38-
uses: google-github-actions/setup-gcloud@cb1e50a9932213ecece00a606661ae9ca44f3397
38+
uses: google-github-actions/setup-gcloud@26f734c2779b00b7dda794207734c511110a4368
3939
- name: Deploy to dev.registry.coder.com
4040
run: gcloud builds triggers run 29818181-126d-4f8a-a937-f228b27d3d34 --branch main
4141
- name: Deploy to registry.coder.com

.github/workflows/golangci-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
name: lint
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v5
1818
- uses: actions/setup-go@v5
1919
with:
2020
go-version: stable
2121
- name: golangci-lint
2222
uses: golangci/golangci-lint-action@v8
2323
with:
24-
version: v2.1
24+
version: v2.1

.github/workflows/release.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "release/*/*/v*.*.*"
7+
8+
jobs:
9+
create-release:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pull-requests: read
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v5
18+
with:
19+
fetch-depth: 0
20+
persist-credentials: false
21+
22+
- name: Extract tag information
23+
id: tag_info
24+
run: |
25+
TAG=${GITHUB_REF#refs/tags/}
26+
echo "tag=$TAG" >> $GITHUB_OUTPUT
27+
28+
IFS='/' read -ra PARTS <<< "$TAG"
29+
NAMESPACE="${PARTS[1]}"
30+
MODULE="${PARTS[2]}"
31+
VERSION="${PARTS[3]}"
32+
33+
echo "namespace=$NAMESPACE" >> $GITHUB_OUTPUT
34+
echo "module=$MODULE" >> $GITHUB_OUTPUT
35+
echo "version=$VERSION" >> $GITHUB_OUTPUT
36+
echo "module_path=registry/$NAMESPACE/modules/$MODULE" >> $GITHUB_OUTPUT
37+
38+
RELEASE_TITLE="$NAMESPACE/$MODULE $VERSION"
39+
echo "release_title=$RELEASE_TITLE" >> $GITHUB_OUTPUT
40+
41+
- name: Find previous tag
42+
id: prev_tag
43+
env:
44+
NAMESPACE: ${{ steps.tag_info.outputs.namespace }}
45+
MODULE: ${{ steps.tag_info.outputs.module }}
46+
CURRENT_TAG: ${{ steps.tag_info.outputs.tag }}
47+
run: |
48+
PREV_TAG=$(git tag -l "release/$NAMESPACE/$MODULE/v*" | sort -V | grep -B1 "$CURRENT_TAG" | head -1)
49+
50+
if [ -z "$PREV_TAG" ] || [ "$PREV_TAG" = "$CURRENT_TAG" ]; then
51+
echo "No previous tag found, using initial commit"
52+
PREV_TAG=$(git rev-list --max-parents=0 HEAD)
53+
fi
54+
55+
echo "prev_tag=$PREV_TAG" >> $GITHUB_OUTPUT
56+
echo "Previous tag: $PREV_TAG"
57+
58+
- name: Generate changelog
59+
id: changelog
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
MODULE_PATH: ${{ steps.tag_info.outputs.module_path }}
63+
PREV_TAG: ${{ steps.prev_tag.outputs.prev_tag }}
64+
CURRENT_TAG: ${{ steps.tag_info.outputs.tag }}
65+
run: |
66+
echo "Generating changelog for $MODULE_PATH between $PREV_TAG and $CURRENT_TAG"
67+
68+
COMMITS=$(git log --oneline --no-merges "$PREV_TAG..$CURRENT_TAG" -- "$MODULE_PATH")
69+
70+
if [ -z "$COMMITS" ]; then
71+
echo "No commits found for this module"
72+
echo "changelog=No changes found for this module." >> $GITHUB_OUTPUT
73+
exit 0
74+
fi
75+
76+
if [[ "$PREV_TAG" == release/* ]]; then
77+
FULL_CHANGELOG=$(gh api repos/:owner/:repo/releases/generate-notes \
78+
--field tag_name="$CURRENT_TAG" \
79+
--field previous_tag_name="$PREV_TAG" \
80+
--jq '.body')
81+
else
82+
echo "New module detected, skipping GitHub API"
83+
FULL_CHANGELOG=""
84+
fi
85+
86+
MODULE_COMMIT_SHAS=$(git log --format="%H" --no-merges "$PREV_TAG..$CURRENT_TAG" -- "$MODULE_PATH")
87+
88+
FILTERED_CHANGELOG="## What's Changed\n\n"
89+
90+
for sha in $MODULE_COMMIT_SHAS; do
91+
SHORT_SHA=${sha:0:7}
92+
93+
COMMIT_LINES=$(echo "$FULL_CHANGELOG" | grep -E "$SHORT_SHA|$(git log --format='%s' -n 1 $sha)" || true)
94+
95+
if [ -n "$COMMIT_LINES" ]; then
96+
FILTERED_CHANGELOG="${FILTERED_CHANGELOG}${COMMIT_LINES}\n"
97+
else
98+
COMMIT_MSG=$(git log --format="%s" -n 1 $sha)
99+
AUTHOR=$(gh api repos/:owner/:repo/commits/$sha --jq '.author.login // .commit.author.name')
100+
FILTERED_CHANGELOG="${FILTERED_CHANGELOG}* $COMMIT_MSG by @$AUTHOR\n"
101+
fi
102+
done
103+
104+
echo "changelog<<EOF" >> $GITHUB_OUTPUT
105+
echo -e "$FILTERED_CHANGELOG" >> $GITHUB_OUTPUT
106+
echo "EOF" >> $GITHUB_OUTPUT
107+
108+
- name: Create Release
109+
env:
110+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111+
TAG_NAME: ${{ steps.tag_info.outputs.tag }}
112+
RELEASE_TITLE: ${{ steps.tag_info.outputs.release_title }}
113+
CHANGELOG: ${{ steps.changelog.outputs.changelog }}
114+
run: |
115+
gh release create "$TAG_NAME" \
116+
--title "$RELEASE_TITLE" \
117+
--notes "$CHANGELOG"

.github/workflows/version-bump.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
issues: write
2121
steps:
2222
- name: Checkout code
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v5
2424
with:
2525
fetch-depth: 0
2626
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)