This repository was archived by the owner on May 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (46 loc) · 1.89 KB
/
CI.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: CI
on:
repository_dispatch:
push:
env:
ZREPL_DEBIAN_BUILD_NOVERIFY_GPG: "1"
jobs:
build:
name: build debian package from released binaries
runs-on: ubuntu-latest
steps:
- run: "echo ${{ github.event_name }} event triggered this step."
- uses: actions/checkout@v1
# default variables from committed file
- name: Dotenv Action
id: dotenv
uses: falti/[email protected]
with:
path: ./zrepl_release.env
- run: echo '::set-env name=ZREPL_MAIN_REPO_COMMIT::${{steps.dotenv.outputs.ZREPL_MAIN_REPO_COMMIT}}'
- run: echo '::set-env name=ZREPL_GO_VERSION::${{steps.dotenv.outputs.ZREPL_GO_VERSION}}'
# repository_dispatch provides variables in payload
- run: 'echo "payload: ${{ toJson(github.event.client_payload) }}"'
- run: echo '::set-env name=ZREPL_MAIN_REPO_COMMIT::${{github.event.client_payload.zrepl_main_repo_commit }}'
if: github.event_name == 'repository_dispatch'
- run: echo '::set-env name=ZREPL_GO_VERSION::${{github.event.client_payload.go_version }}'
if: github.event_name == 'repository_dispatch'
- name: Checkout zrepl main repo
uses: actions/checkout@v2
with:
repository: zrepl/zrepl
path: zrepl-main-repo
ref: ${{env.ZREPL_MAIN_REPO_COMMMIT}}
fetch-depth: 0
- name: Get git-describe of zrepl main repo
run: echo '::set-env name=ZREPL_MAIN_REPO_GIT_DESCRIBE::'"$(set -eux && cd zrepl-main-repo && git describe)"
- name: Bump changelog to git-describe version
run: bash -x ./bump_changelog.bash "${ZREPL_MAIN_REPO_GIT_DESCRIBE#v}"
- name: Download the release artifacts
run: bash -x ./download_ci_release.bash "$ZREPL_MAIN_REPO_COMMIT" "$ZREPL_GO_VERSION"
- name: Build the package
run: bash -x ./docker_make_debs.bash
- uses: actions/upload-artifact@v2-preview
with:
name: packages
path: debs/**