-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (28 loc) · 1.02 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Build and Publish Docker Image to Docker Hub
name: docker build
# Triggers the workflow on push events on the master branch
on:
push:
branches:
- master
jobs:
build:
# The type of environment that the job will run on
runs-on: ubuntu-latest
steps:
# Checks out the repository under $GITHUB_WORKSPACE, so the job can access it
- name: Check out source code
uses: actions/checkout@master
# Builds and pushes a docker image of the source code to Docker Hub
- name: Build and push Docker image
uses: docker/build-push-action@master
with:
# Docker Hub credentials
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
# Docker repository to tag the image with
repository: rastapank/flow-dashboard
# Automatically tags the built image with the git reference as per the readme
tag_with_ref: true
# Adds labels with git repository information to the built image
add_git_labels: true