From 4f5fe6f3420bd8dc5cfad6f912886173175c7853 Mon Sep 17 00:00:00 2001 From: Vladyslav Zhukovskyi Date: Tue, 8 Feb 2022 13:32:35 +0200 Subject: [PATCH] Publish next tag for latest dev image Signed-off-by: Vladyslav Zhukovskyi --- .github/workflows/next-build.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/next-build.yml b/.github/workflows/next-build.yml index 2086a3e5..a806a71f 100644 --- a/.github/workflows/next-build.yml +++ b/.github/workflows/next-build.yml @@ -45,6 +45,9 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 1 + - name: Compute sha revision + id: short_sha + run: echo ::set-output name=hash::$(git rev-parse --short "$GITHUB_SHA") - name: Docker login uses: docker/login-action@v1 with: @@ -58,4 +61,15 @@ jobs: --url ${{ matrix.downloadUrl }} \ --progress plain \ --log-level debug + # publish `repo/name:version-next` docker push ${{ secrets.QUAY_REPOSITORY }}/${{ matrix.dockerImage }}:${{ matrix.version }}-next + + # publish `repo/name:version-shortSha` + docker tag ${{ secrets.QUAY_REPOSITORY }}/${{ matrix.dockerImage }}:${{ matrix.version }}-next ${{ secrets.QUAY_REPOSITORY }}/${{ matrix.dockerImage }}:${{ matrix.version }}-${{ steps.short_sha.outputs.hash }} + docker push ${{ secrets.QUAY_REPOSITORY }}/${{ matrix.dockerImage }}:${{ matrix.version }}-${{ steps.short_sha.outputs.hash }} + + # publish `repo/name:next` + if [ ${{ matrix.latest }} == true ]; then + docker tag ${{ secrets.QUAY_REPOSITORY }}/${{ matrix.dockerImage }}:${{ matrix.version }}-next ${{ secrets.QUAY_REPOSITORY }}/${{ matrix.dockerImage }}:next + docker push ${{ secrets.QUAY_REPOSITORY }}/${{ matrix.dockerImage }}:next + fi