File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Release
22
33on :
4+ schedule :
5+ - cron : ' 0 10 */5 * *'
46 release :
57 types : [created]
68
1012
1113jobs :
1214 build :
13- name : Build Image
15+ name : Build Image and Publish
1416 runs-on : ubuntu-latest
1517 steps :
1618 - name : Checkout repo
@@ -21,18 +23,14 @@ jobs:
2123 run : echo ::set-output name=tag::${GITHUB_REF#refs/*/}
2224
2325 - name : Login to DockerHub
24- env :
25- USERNAME : ${{ secrets.DOCKERHUB_USERNAME }}
26- TOKEN : ${{ secrets.DOCKERHUB_TOKEN }}
27- run : docker login -u $USERNAME -p $TOKEN
26+ uses : docker/login-action@v1
27+ with :
28+ username : ${{ secrets.DOCKERHUB_USERNAME }}
29+ password : ${{ secrets.DOCKERHUB_TOKEN }}
2830
29- - name : build
30- env :
31- IMAGE_TAG : ${{ steps.vars.outputs.tag }}
32- run : |
33- docker build -t "$REGISTRY_HOSTNAME"/"$IMAGE_NAME":"$IMAGE_TAG" .
34-
35- - name : Push the image on DockerHub
36- env :
37- IMAGE_TAG : ${{ steps.vars.outputs.tag }}
38- run : docker push $REGISTRY_HOSTNAME:$IMAGE_NAME:$IMAGE_TAG
31+ - name : Build and push
32+ id : docker_build
33+ uses : docker/build-push-action@v2
34+ with :
35+ push : true
36+ tags : oda2/ibmcloud-cli:latest
You can’t perform that action at this time.
0 commit comments