fix org name #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update docker image | |
on: | |
push: | |
workflow_dispatch: | |
env: | |
IMAGE_NAME: ${{ vars.DOCKERHUB_ORG_NAME }}/uniswap-v2-core | |
jobs: | |
dockerize: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Define tag | |
id: define-env | |
run: | | |
if [[ "${{ github.ref_name }}" == 'master' ]]; then | |
tag='latest' | |
else | |
tag='${{ github.sha }}' | |
fi | |
echo "tag=${tag}" | |
echo "tag=${tag}" >> $GITHUB_OUTPUT | |
- name: Build image | |
run: | | |
docker build -t $IMAGE_NAME:${{ steps.define-env.outputs.tag }} . | |
- name: Push image | |
run: | | |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p "${{ secrets.DOCKER_PASSWORD }}" | |
echo "Push image $IMAGE_NAME:${{ steps.define-env.outputs.tag }} to Docker registry" | |
docker push --all-tags $IMAGE_NAME |