2020-08-23 10:10:54 +02:00
|
|
|
on:
|
2020-09-02 13:48:04 +02:00
|
|
|
release:
|
|
|
|
types: [published]
|
2020-08-23 10:10:54 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
name: Build, push, and deploy
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Checkout master
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2020-09-04 01:32:09 +02:00
|
|
|
- name: Build PostgreSQL container image
|
2020-08-23 10:10:54 +02:00
|
|
|
run: docker build --build-arg DATABASE_TYPE=postgresql --tag docker.pkg.github.com/mikecao/umami/umami:postgresql-$(echo $GITHUB_SHA | head -c7) .
|
|
|
|
|
|
|
|
- name: Build MySQL container image
|
|
|
|
run: docker build --build-arg DATABASE_TYPE=mysql --tag docker.pkg.github.com/mikecao/umami/umami:mysql-$(echo $GITHUB_SHA | head -c7) .
|
|
|
|
|
|
|
|
- name: Docker login
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
run: docker login -u mikecao -p $GITHUB_TOKEN docker.pkg.github.com
|
|
|
|
|
|
|
|
- name: Push image to GitHub
|
|
|
|
run: |
|
|
|
|
docker push docker.pkg.github.com/mikecao/umami/umami:postgresql-$(echo $GITHUB_SHA | head -c7)
|
|
|
|
docker push docker.pkg.github.com/mikecao/umami/umami:mysql-$(echo $GITHUB_SHA | head -c7)
|