Update docker CIs

This commit is contained in:
Clémentine Urquizar 2021-06-30 16:08:01 +02:00
parent f0958c7d9b
commit 14b6224de7
No known key found for this signature in database
GPG Key ID: D8E7CC7422E77E1A
3 changed files with 11 additions and 26 deletions

View File

@ -13,6 +13,9 @@ jobs:
- name: Check if current release is latest - name: Check if current release is latest
run: echo "##[set-output name=is_latest;]$(sh .github/is-latest-release.sh)" run: echo "##[set-output name=is_latest;]$(sh .github/is-latest-release.sh)"
id: release 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 - name: Publish to Registry
if: steps.release.outputs.is_latest == 'true' if: steps.release.outputs.is_latest == 'true'
uses: elgohr/Publish-Docker-Github-Action@master uses: elgohr/Publish-Docker-Github-Action@master
@ -20,3 +23,5 @@ jobs:
name: getmeili/meilisearch name: getmeili/meilisearch
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
tag_names: true
buildargs: COMMIT_SHA,COMMIT_DATE

View File

@ -11,10 +11,16 @@ jobs:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
steps: steps:
- uses: actions/checkout@v1 - 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 - name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master uses: elgohr/Publish-Docker-Github-Action@master
env:
COMMIT_SHA: ${{ github.sha }}
with: with:
name: getmeili/meilisearch name: getmeili/meilisearch
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
tag_names: true tag_names: true
buildargs: COMMIT_SHA,COMMIT_DATE

View File

@ -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