diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 0fa04de..fdea1b7 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,4 +1,4 @@ -name: Announce release +name: Push on: [push] @@ -9,28 +9,30 @@ jobs: - run: | REF=${GITHUB_REF##*/} echo ::set-env name=REF::${REF} - echo ::set-env name=IMAGE_NAME::colomoto/colomoto-docker-base:${REF} + echo ::set-env name=IMAGE::colomoto/colomoto-docker-base:${REF} - uses: actions/checkout@v2 - - run: docker build -t ${IMAGE_NAME} . + - run: docker build -t ${IMAGE} . - name: Login to docker hub uses: actions-hub/docker/login@master env: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - - name: Push image :next + - name: Push image uses: actions-hub/docker@master with: - args: push ${IMAGE_NAME} + args: push ${IMAGE} - name: Release info if: startsWith(github.ref, 'refs/tags/') run: | - docker run --rm ${IMAGE_NAME} apt list --installed > debian-installed.txt - docker run --rm ${IMAGE_NAME} conda env export > conda-environment-strict.yml + docker run --rm ${IMAGE} apt list --installed > debian-installed.txt + docker run --rm ${IMAGE} conda env export > conda-environment-strict.yml - name: Release if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v1 with: - name: ${IMAGE_NAME} + name: ${IMAGE} files: | debian-installed.txt conda-environment-strict.yml + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Dockerfile b/Dockerfile index a987d15..ad12c32 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,6 +60,3 @@ RUN CONDA_VERSION="py37_4.8.2" && \ COPY bin/* /usr/bin/ USER user - -ARG SOURCE_COMMIT -ENV COLOMOTO_BASE_SOURCE_COMMIT=$SOURCE_COMMIT diff --git a/hooks/build b/hooks/build deleted file mode 100755 index d275818..0000000 --- a/hooks/build +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -docker build \ - --build-arg SOURCE_COMMIT=${SOURCE_COMMIT:-$(git rev-parse HEAD)} \ - -t $IMAGE_NAME .