-
-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (32 loc) · 901 Bytes
/
build.yml
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
name: Build and Release
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build Docker image
run: |
docker build -t myapp .
- name: Create container and extract
run: |
mkdir -p ./app
docker create --name extract myapp
docker cp extract:/app/coreapi ./app/coreapi
docker cp extract:/app/cc ./app/cc
docker rm extract
- name: Archive release
run: tar -czvf output.tar.gz ./app
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: run-${{ github.run_number }}-${{ github.sha }}
name: Build ${{ github.sha }}
draft: false
prerelease: false
files: output.tar.gz