This repository has been archived by the owner on Mar 26, 2024. It is now read-only.
Merge branch 'dev' into main #35
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: Publish Docker image | |
on: | |
push: | |
branches: | |
- main | |
env: | |
DOCKER_USERNAME: guillaumedorschner | |
DOCKER_IMAGE_NAME: hackme | |
jobs: | |
push_to_registry: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v2 | |
- name: Log in to Docker Hub | |
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push Docker image | |
run: | | |
docker build . --file Dockerfile --tag $DOCKER_USERNAME/$DOCKER_IMAGE_NAME:latest | |
docker push $DOCKER_USERNAME/$DOCKER_IMAGE_NAME:latest |