-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from irisnet/develop
Merge from develop
- Loading branch information
Showing
3 changed files
with
52 additions
and
54 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: BuildAndPublish | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v.* | ||
|
||
jobs: | ||
build-images: | ||
name: Build Images | ||
# runs-on: self-hosted | ||
runs-on: ubuntu-16.04 | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v1 | ||
- name: Get image tag | ||
run: | | ||
if [[ ${{github.ref}} == "refs/heads/master" ]]; then | ||
echo latest > ${{github.sha}}.TAG; | ||
else | ||
echo ${${{github.ref}}##/} > ${{github.sha}}.TAG; | ||
fi | ||
- name: Build irishub mainnet image | ||
run: source ~/.bashrc; sudo docker build -t irisnet/irishub:`cat ${{github.sha}}.TAG` . | ||
- name: Build irishub testnet image | ||
run: source ~/.bashrc; sudo docker build -t irisnet/irishub:testnet-`cat ${{github.sha}}.TAG` --build-arg NetworkType=testnet . | ||
|
||
# push-images: | ||
# name: Push Images | ||
# runs-on: self-hosted | ||
# needs: build-images | ||
# steps: | ||
- name: Login dockerhub | ||
run: sudo docker login -u ${{secrets.DOCKER_USER}} -p ${{secrets.DOCKER_PASS}} | ||
- name: Publish irishub testnet image | ||
run: sudo docker push irisnet/irishub:testnet-`cat ${{github.sha}}.TAG` | ||
- name: Publish irishub mainnet image | ||
run: sudo docker push irisnet/irishub:`cat ${{github.sha}}.TAG` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: TestUnit | ||
on: [pull_request] | ||
|
||
jobs: | ||
test-unit: | ||
name: Test Units | ||
# runs-on: self-hosted | ||
runs-on: ubuntu-16.04 | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v1 | ||
- name: Run unit tests | ||
run: sudo docker run -v $(pwd):/irishub irisnet/golang sh -c "make test_unit" |