diff --git a/.github/workflows/publish-docker-latest.yml b/.github/workflows/publish-docker-latest.yml index 967248a07..f887f5e2e 100644 --- a/.github/workflows/publish-docker-latest.yml +++ b/.github/workflows/publish-docker-latest.yml @@ -13,6 +13,9 @@ jobs: - name: Check if current release is latest run: echo "##[set-output name=is_latest;]$(sh .github/is-latest-release.sh)" id: release + - name: Set COMMIT_DATE env variable + run: | + echo "COMMIT_DATE=$( git log --pretty=format:'%ad' -n1 --date=short )" >> $GITHUB_ENV - name: Publish to Registry if: steps.release.outputs.is_latest == 'true' uses: elgohr/Publish-Docker-Github-Action@master @@ -20,3 +23,5 @@ jobs: name: getmeili/meilisearch username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + tag_names: true + buildargs: COMMIT_SHA,COMMIT_DATE diff --git a/.github/workflows/publish-docker-tag.yml b/.github/workflows/publish-docker-tag.yml index d607d4286..be540927a 100644 --- a/.github/workflows/publish-docker-tag.yml +++ b/.github/workflows/publish-docker-tag.yml @@ -11,10 +11,16 @@ jobs: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v1 + - name: Set COMMIT_DATE env variable + run: | + echo "COMMIT_DATE=$( git log --pretty=format:'%ad' -n1 --date=short )" >> $GITHUB_ENV - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@master + env: + COMMIT_SHA: ${{ github.sha }} with: name: getmeili/meilisearch username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} tag_names: true + buildargs: COMMIT_SHA,COMMIT_DATE diff --git a/.github/workflows/publish_to_docker.yml b/.github/workflows/publish_to_docker.yml deleted file mode 100644 index 60422a88e..000000000 --- a/.github/workflows/publish_to_docker.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Publish to dockerhub - -on: - push: - tags: - - v*-alpha.* - -jobs: - publish: - name: Publishing to dockerhub - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Set COMMIT_DATE env variable - run: | - echo "COMMIT_DATE=$( git log --pretty=format:'%ad' -n1 --date=short )" >> $GITHUB_ENV - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@master - env: - COMMIT_SHA: ${{ github.sha }} - with: - name: getmeili/meilisearch - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - tag_names: true - buildargs: COMMIT_SHA,COMMIT_DATE