From c31a40fa13019926050f34edaea068d61b31f955 Mon Sep 17 00:00:00 2001 From: Ilya Sosnovsky Date: Tue, 9 Mar 2021 17:37:01 +0300 Subject: [PATCH] workflows changes --- .../{build.yaml => publish-latest.yaml} | 1 + .github/workflows/publish-tag.yaml | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+) rename .github/workflows/{build.yaml => publish-latest.yaml} (95%) create mode 100644 .github/workflows/publish-tag.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/publish-latest.yaml similarity index 95% rename from .github/workflows/build.yaml rename to .github/workflows/publish-latest.yaml index d39b4f4..6fc522c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/publish-latest.yaml @@ -26,3 +26,4 @@ jobs: WERF_STAGES_STORAGE: ":local" WERF_IMAGES_REPO: ${{ secrets.REGISTRY }} WERF_REPO_IMPLEMENTATION: dockerhub + WERF_TAG_GIT_TAG: "latest" \ No newline at end of file diff --git a/.github/workflows/publish-tag.yaml b/.github/workflows/publish-tag.yaml new file mode 100644 index 0000000..b63c3df --- /dev/null +++ b/.github/workflows/publish-tag.yaml @@ -0,0 +1,33 @@ +name: Build and publish to Docker Hub (tags only) +on: + push: + tags: + - '*' + +jobs: + build: + name: Converge + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Docker login + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASS }} + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} + - name: Converge + uses: werf/actions/build-and-publish@master + with: + group: 1.1 + channel: beta + env: + WERF_STAGES_STORAGE: ":local" + WERF_IMAGES_REPO: ${{ secrets.REGISTRY }} + WERF_REPO_IMPLEMENTATION: dockerhub + WERF_TAG_GIT_TAG: ${{ steps.get_version.outputs.VERSION }}