-
Notifications
You must be signed in to change notification settings - Fork 7
47 lines (45 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
name: release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
token: ${{ secrets.CHECKOUT_TOKEN }}
- name: Get branch name
uses: nelonoel/[email protected]
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: docker build
run: |
VERSION=${BRANCH_NAME:1} docker/docker_build.sh
- name: docker image
run: |
VERSION=${BRANCH_NAME:1} docker/docker_build.sh image
- name: docker test
run: |
VERSION=${BRANCH_NAME:1} docker/docker_build.sh test
- name: docker push
run: |
docker push 4pdosc/openembedding:${BRANCH_NAME:1}
docker tag 4pdosc/openembedding:${BRANCH_NAME:1} 4pdosc/openembedding:latest
docker push 4pdosc/openembedding:latest
- name: pypi upload
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
pip3 install twine
twine upload output/dist/openembedding-${BRANCH_NAME:1}.tar.gz