-
Notifications
You must be signed in to change notification settings - Fork 45
56 lines (47 loc) · 1.41 KB
/
release.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Release
on:
- push
- pull_request
env:
MYSQL_ROOT_PASSWORD: root
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 30
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- name: Set version number
id: version
run: |
RELEASE_VERSION="${GITHUB_REF##*/}";
RELEASE_FILE="ushahidi-platform-release-${RELEASE_VERSION}.tar.gz"
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_OUTPUT
echo "RELEASE_FILE=${RELEASE_FILE}" >> $GITHUB_OUTPUT
- name: Build image
uses: docker/build-push-action@v3
with:
context: .
push: false
load: true
tags: local/platform-release:latest
build-args: |
GIT_COMMIT_ID=${{ github.sha }}
GIT_BUILD_REF=${{ github.head_ref }}
- name: Prepare folder
run:
mkdir -p tmp/out
- name: Create release file
uses: addnab/docker-run-action@v3
with:
image: local/platform-release:latest
run: /bin/bash /entrypoint.CES.sh build
options: |
-e RELEASE_VERSION=${{ steps.version.outputs.RELEASE_VERSION }}
-v ${{ github.workspace }}/tmp/out:/vols/out
- name: Upload tarball
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
tmp/out/${{ steps.version.outputs.RELEASE_FILE }}