Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ jobs:
with:
node-version-file: .node-version
registry-url: "https://registry.npmjs.org"
# No dependency cache in a job that publishes: a cache saved by another run could
# change what gets published.
package-manager-cache: false

- uses: robinraju/release-downloader@28fc21f50d76778e7023361aa1f863e717d3d56f # v1.13
with:
Expand Down Expand Up @@ -233,11 +236,15 @@ jobs:

- run: ./ci/steps/docker-buildx-push.sh

# The org doesn't let GITHUB_TOKEN open pull requests, so the branch is pushed and the PR opened
# as the coder-automations App (installed on coder/code-server; its key signs only for
# publish.yaml in the release environment).
repo:
runs-on: ubuntu-latest
environment: release
permissions:
contents: write # To push the branch.
pull-requests: write # To open the PR.
contents: read
id-token: write # Cloud KMS signs the coder-automations App's JWT
env:
TAG: ${{ inputs.version || github.ref_name }}
needs: docker
Expand All @@ -253,13 +260,30 @@ jobs:
echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
with:
persist-credentials: false

- run: ./ci/build/update-repo.sh

# Minted after the update script so the token only exists for the push and the PR.
- name: Generate coder-automations app token
id: app_token
uses: coder/github-app-token-action@00eaec58ee1bfea9c8b48655b7ab7470b07739e5 # main 2026-11-17
with:
client-id: ${{ secrets.CODER_AUTOMATION_APP_ID }}
kms-key: ${{ secrets.CODER_AUTOMATION_APP_KMS_KEY }}
workload-identity-provider: ${{ secrets.APP_KEYS_WORKLOAD_ID_PROVIDER }}
owner: coder
repositories: code-server
permissions: |
contents: write
pull_requests: write

- name: Open PR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.app_token.outputs.token }}
run: |
gh auth setup-git
git config --global user.name cdrci
git config --global user.email opensource@coder.com
git checkout -b "helm/$VERSION"
Expand Down
27 changes: 24 additions & 3 deletions .github/workflows/update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ on:
- cron: "0 16,21 * * *"

jobs:
# The org doesn't let GITHUB_TOKEN open pull requests, so the branch is pushed and the PR opened
# as the coder-automations App. Its key signs only for this file on main, in the update
# environment (main only).
update:
runs-on: ubuntu-latest
environment: update
permissions:
contents: write # To push the branch.
pull-requests: write # To open the PR.
contents: read
id-token: write # Cloud KMS signs the coder-automations App's JWT
env:
TAG: ${{ inputs.version }}

Expand All @@ -33,6 +37,7 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
with:
submodules: true
persist-credentials: false

- name: Check current version
id: check
Expand All @@ -58,11 +63,27 @@ jobs:
- run: ./ci/build/update-vscode.sh
if: steps.check.outputs.done == 'false'

# Minted after the update script so the token only exists for the push and the PR.
- name: Generate coder-automations app token
id: app_token
if: steps.check.outputs.done == 'false'
uses: coder/github-app-token-action@00eaec58ee1bfea9c8b48655b7ab7470b07739e5 # main 2026-11-17
with:
client-id: ${{ secrets.CODER_AUTOMATION_APP_ID }}
kms-key: ${{ secrets.CODER_AUTOMATION_APP_KMS_KEY }}
workload-identity-provider: ${{ secrets.APP_KEYS_WORKLOAD_ID_PROVIDER }}
owner: coder
repositories: code-server
permissions: |
contents: write
pull_requests: write

- name: Open PR
if: steps.check.outputs.done == 'false'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.app_token.outputs.token }}
run: |
gh auth setup-git
git config --global user.name cdrci
git config --global user.email opensource@coder.com
git checkout -b "update/$VERSION"
Expand Down