@@ -2,12 +2,25 @@ name: ci
22
33on :
44 push :
5- branches : [ master ]
6- tags : [ '**' ]
5+ branches : [master]
6+ tags : ['**']
77 pull_request :
8- branches : [ master ]
8+ branches : [master]
99
1010jobs :
11+
12+ build :
13+ name : yarnTest
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v2
17+ 18+ with :
19+ cmd : install
20+ 21+ with :
22+ cmd : test
23+
1124 publish :
1225 if : github.event_name == 'push' || github.event_name == 'release'
1326 runs-on : ubuntu-latest
3043 echo "::set-output name=dock_image::$dock_image"
3144 echo "::set-output name=repo::$repo"
3245
33- # - uses: docker/setup-qemu-action@v1
46+ # - uses: docker/setup-qemu-action@v1
3447 - uses : docker/setup-buildx-action@v1
3548 - name : Cache Docker layers
3649 uses : actions/cache@v2
@@ -44,24 +57,32 @@ jobs:
4457 uses : docker/login-action@v1
4558 with :
4659 username : ${{ secrets.DOCKERHUB_USERNAME }}
47- password : ${{ secrets.DOCKERHUB_PASSWORD }}
48-
60+ password : ${{ secrets.DOCKERHUB_TOKEN }}
61+
4962 - name : Login to GitHub Container Registry
50- uses : docker/login-action@v1
63+ uses : docker/login-action@v1
5164 with :
5265 registry : ghcr.io
5366 username : ${{ github.repository_owner }}
5467 password : ${{ secrets.GITHUB_TOKEN }}
5568
56-
5769 - name : Build and push
5870 uses : docker/build-push-action@v2
5971 id : docker_build
6072 with :
6173 tags : |
6274 docker.io/${{ steps.determine.outputs.dock_image }}
6375 ghcr.io/${{ steps.determine.outputs.dock_image }}
64- # platforms: linux/amd64,linux/ppc64le,linux/arm64
76+ # platforms: linux/amd64,linux/ppc64le,linux/arm64
6577 push : true
6678 cache-from : type=local,src=/tmp/.buildx-cache
6779 cache-to : type=local,dest=/tmp/.buildx-cache
80+
81+ - name : test
82+ uses : actions/checkout@v2
83+ 84+ with :
85+ cmd : install
86+ 87+ with :
88+ cmd : test
0 commit comments