-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (49 loc) · 1.26 KB
/
devcontainer.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
name: Devcontainer Build
on:
workflow_dispatch:
schedule:
- cron: 0 6 * * *
pull_request:
push:
branches:
- main
tags:
- '*'
jobs:
check:
name: Run checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: curl -sfL https://direnv.net/install.sh | bash > /dev/null 2>&1
- run: ./bootstrap.sh
- uses: trunk-io/trunk-action@v1
if: github.event_name != 'pull_request'
build:
name: Build new image
runs-on: ubuntu-latest
needs: check
steps:
- uses: actions/checkout@v3
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: devcontainers/[email protected]
with:
imageName: ghcr.io/${{ github.repository }}
cacheFrom: ghcr.io/${{ github.repository }}
refFilterForPush: refs/heads/main
sync:
name: Synchronize branch
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: connor-baer/action-sync-branch@main
with:
branch: latest
token: ${{ secrets.GITHUB_TOKEN }}
force: true