diff --git a/.github/workflows/buildx.yml b/.github/workflows/buildx.yml index 068fa25..585e6e6 100644 --- a/.github/workflows/buildx.yml +++ b/.github/workflows/buildx.yml @@ -11,6 +11,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx @@ -26,6 +28,13 @@ jobs: echo "GITLAB_DIR=omnibus-gitlab" >> $GITHUB_ENV echo "DOCKER_DIR=omnibus-gitlab/docker" >> $GITHUB_ENV echo "GITLAB_REF_TAG=$(echo ${{ github.ref_name }} | sed 's/\-/\+/')" >> $GITHUB_ENV + DOCKER_NAMESPACE=yrzr/gitlab-ce-arm64v8 + LATEST=$(git tag | sort -rV | head -n 1) + if [ "${LATEST}" == "${{ github.ref_name }}" ]; then + echo "DOCKER_IMAGE_TAGS=${DOCKER_NAMESPACE}:$THIS_TAG,${DOCKER_NAMESPACE}:latest">> $GITHUB_ENV + else + echo "DOCKER_IMAGE_TAGS=${DOCKER_NAMESPACE}:$THIS_TAG">> $GITHUB_ENV + fi - name: Check out https://github.com/gitlabhq/omnibus-gitlab.git uses: actions/checkout@v3 with: @@ -47,4 +56,4 @@ jobs: context: ${{ env.DOCKER_DIR }} platforms: linux/arm64 push: true - tags: yrzr/gitlab-ce-arm64v8:${{ github.ref_name }} + tags: ${{ env.DOCKER_IMAGE_TAGS }}