From 8ec8aabf043d6e7d16d06b65e1ba642e9b2efb8d Mon Sep 17 00:00:00 2001 From: Emre Ferhatoglu <97183433+emre-f@users.noreply.github.com> Date: Wed, 26 Jan 2022 16:53:11 -0500 Subject: [PATCH 1/5] Create docker-snapshot.yml --- .github/workflows/docker-snapshot.yml | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/docker-snapshot.yml diff --git a/.github/workflows/docker-snapshot.yml b/.github/workflows/docker-snapshot.yml new file mode 100644 index 0000000..f607a90 --- /dev/null +++ b/.github/workflows/docker-snapshot.yml @@ -0,0 +1,38 @@ +name: Daily Docker Snapshot +on: + schedule: #to be pushed daily, at 07:00 PM (19:00) + - cron: '* 19 * * *' +jobs: + Pushing-Docker-Image: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: develop #pushing the image from the develop branch + + - name: Setting Up Docker Buildx #used for caching image layers, improves performance + id: buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Get and Set Version + run: | + source ci/set-docker-image-version.sh + echo "version=${DOCKER_IMG_VER}" >> $GITHUB_ENV + + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + builder: ${{ steps.buildx.outputs.name }} + file: ./Dockerfile + push: true + tags: ga4gh/ga4gh-starter-kit-common:snapshot #The docker image is tagged :snapshot + build-args: VERSION=${{ env.version }} + cache-from: type=gha #GitHub Actions Cache Exporter + cache-to: type=gha,mode=max From 4bfc214e15ca04be4ef26c6c4b158972dce3a956 Mon Sep 17 00:00:00 2001 From: Emre Ferhatoglu <97183433+emre-f@users.noreply.github.com> Date: Thu, 27 Jan 2022 11:05:15 -0500 Subject: [PATCH 2/5] Update docker-snapshot.yml --- .github/workflows/docker-snapshot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-snapshot.yml b/.github/workflows/docker-snapshot.yml index f607a90..632f163 100644 --- a/.github/workflows/docker-snapshot.yml +++ b/.github/workflows/docker-snapshot.yml @@ -1,7 +1,7 @@ name: Daily Docker Snapshot on: schedule: #to be pushed daily, at 07:00 PM (19:00) - - cron: '* 19 * * *' + - cron: '* 19 * * *' #NOTE: Only works if the workflow file is present in the default branch jobs: Pushing-Docker-Image: runs-on: ubuntu-latest From ca8209ca36606c0b3d1aaebe44caf93b58ffae18 Mon Sep 17 00:00:00 2001 From: Emre Ferhatoglu <97183433+emre-f@users.noreply.github.com> Date: Wed, 9 Feb 2022 12:06:13 -0500 Subject: [PATCH 3/5] Update docker-snapshot.yml --- .github/workflows/docker-snapshot.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-snapshot.yml b/.github/workflows/docker-snapshot.yml index 632f163..d1eeca2 100644 --- a/.github/workflows/docker-snapshot.yml +++ b/.github/workflows/docker-snapshot.yml @@ -1,7 +1,8 @@ name: Daily Docker Snapshot -on: - schedule: #to be pushed daily, at 07:00 PM (19:00) - - cron: '* 19 * * *' #NOTE: Only works if the workflow file is present in the default branch +on: [push, pull_request, workflow_dispatch] +# on: +# schedule: #to be pushed daily, at 07:00 PM (19:00) +# - cron: '0 19 * * *' #NOTE: Only works if the workflow file is present in the default branch jobs: Pushing-Docker-Image: runs-on: ubuntu-latest From 174c77ef1e56fe2590d0aa15e5a23950f7561150 Mon Sep 17 00:00:00 2001 From: Emre Ferhatoglu <97183433+emre-f@users.noreply.github.com> Date: Wed, 9 Feb 2022 12:16:33 -0500 Subject: [PATCH 4/5] Update docker-snapshot.yml --- .github/workflows/docker-snapshot.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-snapshot.yml b/.github/workflows/docker-snapshot.yml index d1eeca2..3b7bce3 100644 --- a/.github/workflows/docker-snapshot.yml +++ b/.github/workflows/docker-snapshot.yml @@ -1,8 +1,7 @@ name: Daily Docker Snapshot -on: [push, pull_request, workflow_dispatch] -# on: -# schedule: #to be pushed daily, at 07:00 PM (19:00) -# - cron: '0 19 * * *' #NOTE: Only works if the workflow file is present in the default branch +on: + schedule: #to be pushed daily, at 07:00 PM (19:00) + - cron: '0 19 * * *' #NOTE: Only works if the workflow file is present in the default branch jobs: Pushing-Docker-Image: runs-on: ubuntu-latest From 9f5f1f5a6cad7f381da23839f380df29e437d4dd Mon Sep 17 00:00:00 2001 From: Emre Ferhatoglu <97183433+emre-f@users.noreply.github.com> Date: Wed, 9 Feb 2022 12:20:23 -0500 Subject: [PATCH 5/5] Update docker-snapshot.yml --- .github/workflows/docker-snapshot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-snapshot.yml b/.github/workflows/docker-snapshot.yml index 3b7bce3..039cfa1 100644 --- a/.github/workflows/docker-snapshot.yml +++ b/.github/workflows/docker-snapshot.yml @@ -1,7 +1,7 @@ name: Daily Docker Snapshot on: schedule: #to be pushed daily, at 07:00 PM (19:00) - - cron: '0 19 * * *' #NOTE: Only works if the workflow file is present in the default branch + - cron: '0 19 * * *' #NOTE: Only works if the workflow file is present in the default branch jobs: Pushing-Docker-Image: runs-on: ubuntu-latest