-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (57 loc) · 1.94 KB
/
main.yaml
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
name: main
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
tii-communication-link-deb:
runs-on: ubuntu-latest
steps:
- name: Checkout communication-link
uses: actions/checkout@v2
with:
path: communication_link
- name: Checkout ci-scripts
uses: actions/checkout@v2
with:
repository: tiiuae/fogsw-ci-scripts
path: fogsw-ci-scripts
# Run docker build
- name: Run fog-sw docker build
run: |
set -eux
mkdir bin
pushd fogsw-ci-scripts
./generate_deb.sh ../communication_link ../bin/
popd
- name: Install jfrog CLI tool
env:
JFROG_CLI_URL: https://artifactory.ssrc.fi/artifactory/gen-public-local/tools/jfrog/jfrog-1.45.2.tar.gz
if: github.event_name == 'push'
run: |
set -exu
mkdir -p "$GITHUB_WORKSPACE/.jfrog/bin"
curl -L "$JFROG_CLI_URL" -o "$GITHUB_WORKSPACE/.jfrog/jfrog.tar.gz"
tar -C "$GITHUB_WORKSPACE/.jfrog/bin" -zxf "$GITHUB_WORKSPACE/.jfrog/jfrog.tar.gz"
echo "$GITHUB_WORKSPACE/.jfrog/bin" >> "$GITHUB_PATH"
echo "JFROG_CLI_HOME_DIR=$GITHUB_WORKSPACE/.jfrog" >> "$GITHUB_ENV"
- name: Upload to Artifactory
env:
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
JFROG_CLI_LOG_LEVEL: DEBUG
ARTIFACTORY_REPO: debian-private-local
DISTRIBUTION: focal
COMPONENT: fog-sw
ARCHITECTURE: amd64
CI: true
if: github.event_name == 'push'
run: |
set -exu
jfrog rt c import "$ARTIFACTORY_TOKEN"
jfrog rt ping
pkg=$(find bin -name 'communication-link*.deb')
jfrog rt u --deb "$DISTRIBUTION/$COMPONENT/$ARCHITECTURE" \
--target-props COMMIT="$GITHUB_SHA" \
"$pkg" \
"$ARTIFACTORY_REPO"