-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (68 loc) · 2.09 KB
/
ci.yaml
File metadata and controls
83 lines (68 loc) · 2.09 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Code Test and docker devkit-deno image build
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build \
--build-arg USERNAME=$(whoami) \
--build-arg USER_UID=$(id -u) \
--build-arg USER_GID=$(id -g) \
--target devkit-deno \
-t deno-container \
-f .devcontainer/Dockerfile .
- name: Run tests and generate coverage
run: |
docker run --rm \
-v ${{ github.workspace }}:/workspaces \
deno-container \
deno task test
# - name: Generate documentation
# run: |
# docker run --rm \
# -v ${{ github.workspace }}:/workspaces \
# deno-container \
# deno task doc
# - name: Setup Pages
# uses: actions/configure-pages@v4
# - name: Prepare artifacts for upload
# run: |
# mkdir -p ./doc/coverage
# mkdir -p ./doc/documentation
# cp -r ./coverage/html/* ./doc/coverage/
# cp -r ./documentation/* ./doc/documentation/
# - name: Upload artifact
# uses: actions/upload-pages-artifact@v3
# with:
# path: './doc'
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
file: .devcontainer/Dockerfile
context: .
target: cfx-deno-cli
push: true
tags: cfxdevkit/cfx-deno-cli-ci
- name: Log out from Docker Hub
run: docker logout