Docker #553
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 | |
on: | |
schedule: | |
- cron: '0 6 * * *' | |
push: | |
branches: | |
- master | |
env: | |
# TODO: Change variable to your image's name. | |
IMAGE_NAME: kjake/base | |
jobs: | |
push: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
- name: Build image | |
run: docker build . --file Dockerfile --tag $IMAGE_NAME:latest | |
- name: Log into registry | |
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login --username ${{ secrets.DOCKER_USERNAME }} --password-stdin | |
- name: Push image | |
run: | | |
docker image push $IMAGE_NAME:latest |