Skip to content

Commit 09f122a

Browse files
committed
ci: Add Schedule
1 parent 059502a commit 09f122a

1 file changed

Lines changed: 13 additions & 15 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Release
22

33
on:
4+
schedule:
5+
- cron: '0 10 */5 * *'
46
release:
57
types: [created]
68

@@ -10,7 +12,7 @@ env:
1012

1113
jobs:
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

0 commit comments

Comments
 (0)