diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 00c1e5f..22e5dd0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -25,9 +25,33 @@ jobs: fetch-depth: 0 fetch-tags: true submodules: true + # - + # name: Check checkout + # run: ls -la - - name: Check checkout - run: ls -la + name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - + name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.IMAGE_NAME }} + - + name: Push to Docker Hub + uses: docker/build-push-action@v6 + with: + # repository: ${{ env.IMAGE_NAME }} + # tag_with_ref: true + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + build-args: | + BUILDKIT_CONTEXT_KEEP_GIT_DIR=true #- name: Push to GitHub Packages # uses: docker/build-push-action@v2 # with: diff --git a/Dockerfile b/Dockerfile index 7fd4877..577c210 100644 --- a/Dockerfile +++ b/Dockerfile @@ -67,8 +67,6 @@ ENV PATH="${MVD_HOME}/bin:${PATH}" RUN echo "export PATH=\"${MVD_HOME}/bin:\$PATH\"" >> "$HOME/.profile" COPY . movedo -RUN ls -la "$MVD_HOME" - # Workaround to get tags, until this bug is solved: # https://gitlab.com/gitlab-org/gitlab-runner/-/issues/25373 # This also fetches the whole history, as apparently GitLab