-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 1.04 KB
/
check_update.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Bump Build 💪
on:
schedule:
- cron: "0 10 * * *"
workflow_dispatch:
jobs:
check_codeserver_update:
name: check code-server new release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- id: check_update
run: |
RELEASES=$(gh release list --repo coder/code-server)
echo LATEST=$(echo "$RELEASES" | grep -i latest | cut -f 1 | sed 's/v//') >> "$GITHUB_ENV"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: image_tag
run: |
make print-TAG CODE_SERVER_BASE_TAG=${{ env.LATEST }} >> "$GITHUB_ENV"
- id: check_image_already_built
run: |
docker pull ghcr.io/cosmo-workspace/dev-code-server:${{ env.TAG }} && echo ALREADY_EXIST="1" >> "$GITHUB_ENV" || echo
- id: printenv
run: |
printenv
- if: env.ALREADY_EXIST != '1'
run: gh workflow run build.yaml -f CODE_SERVER_BASE_TAG=${{ env.LATEST }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}