Skip to content

Commit

Permalink
Merge pull request #1 from irisnet/develop
Browse files Browse the repository at this point in the history
Merge from develop
  • Loading branch information
OliviaPp8 authored Dec 4, 2019
2 parents d47389f + 2937c63 commit 0854cfc
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 54 deletions.
54 changes: 0 additions & 54 deletions .circleci/config.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/BuildAndPublish.yml
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`
13 changes: 13 additions & 0 deletions .github/workflows/TestUnit.yml
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"

0 comments on commit 0854cfc

Please sign in to comment.