I hate camel case #296
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: Docker Publish | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Docker login | |
env: | |
DOCKER_USER: ${{secrets.DOCKER_USER}} | |
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | |
run: | | |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | |
- name: Build the Docker image | |
run: docker build . --file Dockerfile --tag buildtheearth/main-bot:$(git rev-parse --short HEAD) --tag buildtheearth/main-bot:latest | |
- name: Docker push tag | |
run: docker push buildtheearth/main-bot:$(git rev-parse --short HEAD) | |
- name: Docker push latest | |
run: docker push buildtheearth/main-bot:latest |