-
Notifications
You must be signed in to change notification settings - Fork 15
34 lines (30 loc) · 1.09 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
name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build
run: make -j$(nproc)
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
prerelease: true
files: linux-5.5.19-ctsi-2.bin
env:
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}
- run: echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish <version> to Docker Hub
if: startsWith(github.ref, 'refs/tags/v')
run: |
docker tag cartesi/linux-kernel:devel cartesi/linux-kernel:${GITHUB_REF:11}
docker push cartesi/linux-kernel:${GITHUB_REF:11}
- name: Publish [latest] to Docker Hub
if: github.ref == 'refs/heads/master'
run: |
docker tag cartesi/linux-kernel:devel cartesi/linux-kernel:latest
docker push cartesi/linux-kernel:latest