From 0855b6ab3cbefa9f8a9bcdd63268a028222f0122 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Thu, 10 Feb 2022 08:56:48 +0530 Subject: [PATCH] Added option to pass repository name (#46) Added option to pass image name in docker publish Signed-off-by: Yuvraj --- flytetools/.github/workflows/bump_version.yml | 4 ++-- flytetools/.github/workflows/goreleaser.yml | 3 +-- flytetools/.github/workflows/publish.yml | 6 +++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/flytetools/.github/workflows/bump_version.yml b/flytetools/.github/workflows/bump_version.yml index 490cd20f4d..8506d4120e 100644 --- a/flytetools/.github/workflows/bump_version.yml +++ b/flytetools/.github/workflows/bump_version.yml @@ -15,7 +15,7 @@ jobs: if: github.actor != 'goreleaserbot' runs-on: ubuntu-latest outputs: - version: ${{ steps.bump-version.outputs.tag }} + version: ${{ steps.bump_version.outputs.tag }} steps: - uses: actions/checkout@v2 with: @@ -24,7 +24,7 @@ jobs: id: extract_branch run: echo "::set-output name=branch_name::$(echo ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}})" - name: Bump version and push tag - id: bump-version + id: bump_version uses: anothrNick/github-tag-action@1.34.0 env: GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} diff --git a/flytetools/.github/workflows/goreleaser.yml b/flytetools/.github/workflows/goreleaser.yml index 3468c27d0a..0b99a7f11a 100644 --- a/flytetools/.github/workflows/goreleaser.yml +++ b/flytetools/.github/workflows/goreleaser.yml @@ -1,4 +1,4 @@ -name: Bump Version +name: Go Releaser on: workflow_call: @@ -20,7 +20,6 @@ jobs: - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: - version: latest args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} \ No newline at end of file diff --git a/flytetools/.github/workflows/publish.yml b/flytetools/.github/workflows/publish.yml index 88652b4174..9f32968673 100644 --- a/flytetools/.github/workflows/publish.yml +++ b/flytetools/.github/workflows/publish.yml @@ -11,6 +11,10 @@ on: description: "Version of image" required: true type: string + repository: + description: "Repository Name" + required: false + type: string push: description: "Push to registry" required: false @@ -33,7 +37,7 @@ jobs: with: username: "${{ secrets.FLYTE_BOT_USERNAME }}" password: "${{ secrets.FLYTE_BOT_PAT }}" - image_name: ${{ github.repository }} + image_name: ${{ inputs.repository }} image_tag: latest,${{ github.sha }},${{ inputs.version }} push_git_tag: ${{ inputs.push }} dockerfile: ${{ inputs.dockerfile }}