From 28d3988785830d9996327cf2ba239656bc838bdf Mon Sep 17 00:00:00 2001 From: AnJia Date: Thu, 30 Dec 2021 10:27:25 +0800 Subject: [PATCH] Update gcr.io_mirror.yml --- .github/workflows/gcr.io_mirror.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/gcr.io_mirror.yml b/.github/workflows/gcr.io_mirror.yml index 3880394..2c8ac13 100644 --- a/.github/workflows/gcr.io_mirror.yml +++ b/.github/workflows/gcr.io_mirror.yml @@ -1,6 +1,8 @@ name: gcr.io_mirror on: + schedule: + - cron: "0 0 * * *" issues: types: [opened] label: @@ -52,11 +54,21 @@ jobs: } gcr_image = issuesResponse["data"][0]["title"].substring(start).trim() issue_number = issuesResponse["data"][0]["number"] + + const issuesComment = await github.issues.createComment({ + owner: '${{ env.GH_USER }}', + repo: '${{ env.REPO_NAME }}', + issue_number: issue_number, + body: '构建进展 [https://github.com/${{ env.GH_USER }}/${{ env.REPO_NAME }}/actions/runs/${{ github.run_id }}](https://github.com/${{ env.GH_USER }}/${{ env.REPO_NAME }}/actions/runs/${{ github.run_id }})' + }); + console.log("create issues comment resp:",issuesComment["status"]); } console.log("gcr_image from issues is ", gcr_image,", issue_number is ",issue_number) core.setOutput('GCR_IMAGE', gcr_image) core.setOutput('ISSUE_NUMBER', issue_number) + + - name: Retrieve transfer image name run: | echo "::set-output name=MY_DOCKER_IMAGE_NAME::$(echo ${{ steps.pullIssuesPorter.outputs.GCR_IMAGE }} | sed 's/k8s\.gcr\.io/${{ secrets.DOCKER_HUB_USERNAME }}\/google-containers/g;s/gcr\.io/${{ secrets.DOCKER_HUB_USERNAME }}/g;s/\//\./g;s/ /\n/g;s/${{ secrets.DOCKER_HUB_USERNAME }}\./${{ secrets.DOCKER_HUB_USERNAME }}\//g')"