Skip to content

Commit 358e4e9

Browse files
committed
try again
1 parent bef78e6 commit 358e4e9

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,54 @@ jobs:
9696
run: yarn _audit
9797
if: success()
9898

99+
temp:
100+
name: AUR
101+
needs: prebuild
102+
runs-on: ubuntu-latest
103+
timeout-minutes: 10
104+
env:
105+
GH_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
106+
steps:
107+
# We need to checkout code-server so we can get the version
108+
- name: Checkout code-server
109+
uses: actions/checkout@v3
110+
with:
111+
fetch-depth: 0
112+
path: './code-server'
113+
114+
- name: Get version
115+
id: version
116+
run: |
117+
pwd
118+
ls
119+
cd code-server
120+
echo "::set-output name=version::$(jq -r .version package.json)"
121+
122+
- name: Checkout code-server-aur repo
123+
uses: actions/checkout@v3
124+
with:
125+
repository: "cdrci/code-server-aur"
126+
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
127+
128+
- name: Configure git
129+
run: |
130+
git config --global user.name cdrci
131+
git config --global user.email opensource@coder.com
132+
133+
# The update.sh script will take care of git add ., git commit and git push
134+
# Reference: https://github.com/coder/code-server-aur/blob/master/update.sh
135+
- name: Bump version
136+
run: |
137+
git checkout -b update-version-${{ steps.version.outputs.version }}
138+
sh ./update.sh ${{ steps.version.outputs.version }}
139+
140+
- name: Open PR
141+
# We need to gitt push -u otherwise gh will prompt
142+
# asking where to push branch.
143+
run: |
144+
git push -u origin $(git branch --show)
145+
gh pr create --repo coder/code-server-aur --title "chore: bump version to ${{ steps.version.outputs.version }}" --body "PR opened by @$GITHUB_ACTOR" --assignee $GITHUB_ACTOR
146+
99147
build:
100148
name: Build
101149
needs: prebuild

0 commit comments

Comments
 (0)