Skip to content
Merged
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
23 changes: 20 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,32 @@ jobs:

aur:
runs-on: ubuntu-latest
environment: release
timeout-minutes: 10
env:
GH_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
TAG: ${{ inputs.version || github.ref_name }}

steps:
- name: Set version to tag without leading v
run: |
echo "VERSION=${TAG#v}" >> $GITHUB_ENV

- name: Generate coder-automations app token
id: app_token
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
with:
app-id: ${{ secrets.CODER_AUTOMATION_APP_ID }}
private-key: ${{ secrets.CODER_AUTOMATION_APP_PRIVATE_KEY }}
owner: coder
repositories: code-server-aur
permission-contents: write
permission-pull-requests: write

- name: Checkout code-server-aur repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
with:
repository: "cdrci/code-server-aur"
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
token: ${{ steps.app_token.outputs.token }}
ref: "master"

- name: Configure git
Expand All @@ -93,6 +104,8 @@ jobs:
srcinfo: true

- name: Open PR
env:
GH_TOKEN: ${{ steps.app_token.outputs.token }}
run: |
git checkout -b update-version-${{ env.VERSION }}
git add .
Expand Down Expand Up @@ -156,8 +169,10 @@ jobs:

repo:
runs-on: ubuntu-latest
permissions:
contents: write # To push the branch.
pull-requests: write # To open the PR.
env:
GH_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
TAG: ${{ inputs.version || github.ref_name }}
needs: docker

Expand All @@ -171,6 +186,8 @@ jobs:
- run: ./ci/build/update-repo.sh

- name: Open PR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name cdrci
git config --global user.email opensource@coder.com
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ on:
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write # To push the branch.
pull-requests: write # To open the PR.
env:
TAG: ${{ inputs.version }}
GH_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}

steps:
- name: Fetch latest tag
Expand Down Expand Up @@ -58,6 +60,8 @@ jobs:

- name: Open PR
if: steps.check.outputs.done == 'false'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name cdrci
git config --global user.email opensource@coder.com
Expand Down