forked from pinterest/querybook
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (33 loc) · 1.35 KB
/
publish.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
name: Publish to Registry
on:
schedule:
- cron: '0 17 * * 1' # Monday at 10am PDT
release:
types: [published]
push:
branches:
- master
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get version from package.json
run: |
PATCH_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')
MINOR_VERSION=${PATCH_VERSION%.*}
MAJOR_VERSION=${MINOR_VERSION%.*}
echo PATCH_VERSION=$PATCH_VERSION >> $GITHUB_ENV
echo MINOR_VERSION=$MINOR_VERSION >> $GITHUB_ENV
echo MAJOR_VERSION=$MAJOR_VERSION >> $GITHUB_ENV
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
env:
EXTRA_PIP_INSTALLS: extra.txt
with:
name: querybook/querybook
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: 'latest,${{ env.PATCH_VERSION }},${{ env.MINOR_VERSION }},${{ env.MAJOR_VERSION }}'
cache: ${{ github.event_name != 'schedule' }}
buildargs: EXTRA_PIP_INSTALLS