-
Notifications
You must be signed in to change notification settings - Fork 1
113 lines (105 loc) · 3.57 KB
/
release.yml
File metadata and controls
113 lines (105 loc) · 3.57 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
release-binary:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Switch to Rust Nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Build
run: cargo build --release --verbose
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: target/release/codecharacter-driver
generate_release_notes: true
release-docker-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for cpp compiler
id: meta-cpp-compiler
uses: docker/metadata-action@v3
with:
images: ghcr.io/delta/codecharacter-cpp-compiler
- name: Build and push cpp compiler image
uses: docker/build-push-action@v2
with:
context: ./player_code/cpp
file: ./player_code/cpp/compiler.Dockerfile
push: true
tags: ${{ steps.meta-cpp-compiler.outputs.tags }}
labels: ${{ steps.meta-cpp-compiler.outputs.labels }}
- name: Extract metadata for cpp runner
id: meta-cpp-runner
uses: docker/metadata-action@v3
with:
images: ghcr.io/delta/codecharacter-cpp-runner
- name: Build and push cpp runner image
uses: docker/build-push-action@v2
with:
context: ./player_code/cpp
file: ./player_code/cpp/runner.Dockerfile
push: true
tags: ${{ steps.meta-cpp-runner.outputs.tags }}
labels: ${{ steps.meta-cpp-runner.outputs.labels }}
- name: Extract metadata for java compiler
id: meta-java-compiler
uses: docker/metadata-action@v3
with:
images: ghcr.io/delta/codecharacter-java-compiler
- name: Build and push java compiler image
uses: docker/build-push-action@v2
with:
context: ./player_code/java
file: ./player_code/java/compiler.Dockerfile
push: true
tags: ${{ steps.meta-java-compiler.outputs.tags }}
labels: ${{ steps.meta-java-compiler.outputs.labels }}
- name: Extract metadata for java runner
id: meta-java-runner
uses: docker/metadata-action@v3
with:
images: ghcr.io/delta/codecharacter-java-runner
- name: Build and push java runner image
uses: docker/build-push-action@v2
with:
context: ./player_code/java
file: ./player_code/java/runner.Dockerfile
push: true
tags: ${{ steps.meta-java-runner.outputs.tags }}
labels: ${{ steps.meta-java-runner.outputs.labels }}
- name: Extract metadata for python
id: meta-python
uses: docker/metadata-action@v3
with:
images: ghcr.io/delta/codecharacter-python-runner
- name: Build and push python image
uses: docker/build-push-action@v2
with:
context: ./player_code/python
file: ./player_code/python/Dockerfile
push: true
tags: ${{ steps.meta-python.outputs.tags }}
labels: ${{ steps.meta-python.outputs.labels }}