This repository has been archived by the owner on Dec 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (46 loc) · 1.99 KB
/
main.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
name: Extensions
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
extension: [ 'ifupdown', 'cloud-init-deps', 'cloud-init' ]
tc_version: [ '11.0-x86_64' ]
container: tatsushid/tinycore:${{ matrix.tc_version }}
steps:
- name: Checkout the repo
uses: actions/checkout@v1
- name: Build the extension (${{ matrix.extension }})
id: tcz
run: |
tce-load -wicl git compiletc coreutils
cd ${GITHUB_WORKSPACE}/extensions/${{ matrix.extension }}
make TC_VERSION=${{ matrix.tc_version }}
- name: Download and setup JFrog CLI
run: |
curl -L -o jfrog 'https://api.bintray.com/content/jfrog/jfrog-cli-go/$latest/jfrog-cli-linux-amd64/jfrog?bt_package=jfrog-cli-linux-amd64'
chmod +x jfrog
sudo mv jfrog /usr/bin/jfrog
sudo mkdir -p /etc/ssl/certs
sudo ln -s /usr/local/etc/ssl/cacert.pem /etc/ssl/certs/ca-certificates.crt
- name: Upload the artifact to Bintray
env:
JFROG_CLI_LOG_LEVEL: DEBUG
JFROG_CLI_OFFER_CONFIG: false
run: |
package=${{ matrix.extension }}-tc${{ matrix.tc_version }}
version=$(cat ${HOME}/artifacts/config.version)
source=$(cat ${HOME}/artifacts/config.source)
license=$(cat ${HOME}/artifacts/config.license)
jfrog bt config \
--user ${{ secrets.BINTRAY_API_USER }} --key ${{ secrets.BINTRAY_API_KEY }}
jfrog bt package-show on-prem/tinycore-extensions/${{ matrix.extension }} || \
jfrog bt package-create \
--vcs-url "https://github.com/${{ github.repository }}" \
--licenses "${license}" \
on-prem/tinycore-extensions/${{ matrix.extension }}
jfrog bt upload \
"${HOME}/artifacts/${package}/" \
on-prem/tinycore-extensions/${{ matrix.extension }}/${version} \
${{ matrix.tc_version }}/${{ matrix.extension }}/${version}/ || true