From 85529e8b489cc253f1755190fd35bacfb4c7fed2 Mon Sep 17 00:00:00 2001 From: peusebiu Date: Thu, 16 Jun 2022 17:28:42 +0300 Subject: [PATCH] Update sync-golang-image.yaml --- .github/workflows/sync-golang-image.yaml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/sync-golang-image.yaml b/.github/workflows/sync-golang-image.yaml index f62a821bd..94f3ac5e3 100644 --- a/.github/workflows/sync-golang-image.yaml +++ b/.github/workflows/sync-golang-image.yaml @@ -1,18 +1,17 @@ name: 'Sync golang image from docker to ghcr' on: - workflow_dispatch: - inputs: - golang_version: - required: true - description: The version of golang to push to ghcr.io/project-zot/*. - type: string + schedule: + - cron: '30 1 * * *' + push: + branches: + - master env: - GOLANG_VERSION: ${{ github.event.inputs.golang_version }} + GOLANG_VERSION: 1.18 jobs: sync-golang: - name: 'pull & push golang' + name: 'sync' runs-on: ubuntu-latest steps: - name: Log in to GitHub Docker Registry @@ -22,7 +21,7 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Tag and push to ghcr + - name: Tag and push golang to ghcr run: | docker pull golang:${{ env.GOLANG_VERSION }} docker tag golang:${{ env.GOLANG_VERSION }} ghcr.io/${{ github.repository_owner }}/golang:${{ env.GOLANG_VERSION }}