-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (49 loc) · 1.3 KB
/
build-and-release.yaml
File metadata and controls
56 lines (49 loc) · 1.3 KB
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
name: build-and-release
on:
push:
branches: [ main ]
paths-ignore:
- README.md
- 'docs/**'
pull_request:
branches: [ main ]
paths-ignore:
- README.md
- 'docs/**'
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up Docker BuildKit
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create dummy mount folders
run: |
mkdir -p ~/.config/gh
mkdir -p ~/.azure
- name: Build and run CLI
uses: devcontainers/ci@v0.3
env:
GITHUB_TOKEN: ${{ secrets.GH_CROSS_REPO_TOKEN }}
BUILD_NUMBER: ${{ github.run_id }}
IS_PR: ${{ github.head_ref }}
BRANCH: ${{ github.ref }}
with:
imageName: ghcr.io/stuartleeks/devcontainer-cli-devcontainer
cacheFrom: ghcr.io/stuartleeks/devcontainer-cli-devcontainer
cacheTo: type=inline
runCmd: |
sudo chown -R $(whoami) /go/pkg
./scripts/ci_release.sh
env: |
GITHUB_TOKEN
BUILD_NUMBER
IS_CI=1
IS_PR
BRANCH