-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (51 loc) · 1.29 KB
/
push.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: push
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
# Re-push all templates?
# https://crontab.guru/#0_0_*_*_5
- cron: "0 0 * * 5"
permissions:
actions: read
checks: none
contents: read
id-token: write
deployments: none
issues: none
packages: none
pull-requests: none
repository-projects: none
security-events: write
statuses: none
jobs:
quick:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Cancel previous runs
if: github.event_name == 'pull_request'
uses: styfle/[email protected]
- name: Checkout
uses: actions/checkout@v4
- name: Check formatting
uses: dprint/[email protected]
templates:
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
if: github.event_name == 'pull_request'
uses: styfle/[email protected]
- name: Checkout
uses: actions/checkout@v4
- name: Install Coder CLI
run: |
curl -L https://coder.com/install.sh | sh
- name: Push Templates to Coder
run: |
${{ github.workspace }}/.scripts/push.sh \
--directory "${{ github.workspace }}" \
--targets "${{ secrets.CODER_TARGETS }}"