-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (37 loc) · 1.27 KB
/
build_docker_dashboard.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
39
40
41
42
43
44
name: Build Docker Dashboard
on:
push:
branches: main
paths:
- dashboard/**
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get commit message
# Copied from here: https://github.mirror.nvdadr.community/t/accessing-commit-message-in-pull-request-event/17158/2
run: |
echo "commitmsg=$(git log --format=%B -n 1 ${{ github.event.after }})" >> $GITHUB_ENV
- name: Publish commit info
shell: bash
run: |
echo $GITHUB_SHA > 'dashboard/data/commit_hash.txt'
echo $commitmsg > 'dashboard/data/commit_msg.txt'
date +"%Y-%m-%d %T" >> 'dashboard/data/deploy_date.txt'
- name: Build and push Docker images
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
repository: flrs/sd_covid_dashboard_dashboard
path: dashboard
tags: latest
tag_with_sha: true
tag_with_ref: true
add_git_labels: true
- name: Update MicroBadger
uses: fjogeleit/http-request-action@master
with:
url: ${{ secrets.MICROBADGER_WEBHOOK_DASHBOARD }}
method: 'POST'