Build Docker images #45
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: Build Docker images | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- .github/workflows/build.yml | |
- Dockerfile.v1 | |
- Dockerfile.v2 | |
schedule: | |
- cron: '0 0 * * 0' | |
workflow_dispatch: | |
jobs: | |
build-docker: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push - frxyt/cd-docker:v1 | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile.v1 | |
push: true | |
tags: | | |
frxyt/cd-docker:v1 | |
- name: Build and push - frxyt/cd-docker:v2 | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile.v2 | |
push: true | |
tags: | | |
frxyt/cd-docker:v2 |