forked from cube-js/cube
-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (74 loc) · 2.12 KB
/
master.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Master
on:
push:
paths:
- '.github/workflows/push.yml'
- '.github/workflows/master.yml'
- 'packages/**'
- '.eslintrc.js'
- '.prettierrc'
- 'lerna.json'
- 'package.json'
- 'rollup.config.js'
- 'yarn.lock'
- 'docs-gen/**'
- 'docs/**'
branches:
- master
jobs:
latest-tag-sha:
runs-on: ubuntu-20.04
outputs:
sha: ${{ steps.get-tag.outputs.sha }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- id: git-log
run: git log HEAD~30..HEAD
- id: get-tag-test
run: echo "$SHA $(git rev-list -n 1 $(git tag --contains $SHA))"
env:
SHA: ${{ github.sha }}
- id: get-tag
run: echo "::set-output name=sha::$(git rev-list -n 1 $(git tag --contains $SHA))"
env:
SHA: ${{ github.sha }}
- id: get-tag-out
run: echo "$OUT"
env:
OUT: ${{ steps.get-tag.outputs.sha }}
docker-image-dev:
name: Release :dev image
runs-on: ubuntu-20.04
needs: latest-tag-sha
if: (needs['latest-tag-sha'].outputs.sha != github.sha)
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
version: v0.6.3
- name: Push to Docker Hub
uses: docker/build-push-action@v2
with:
context: ./
file: ./packages/cubejs-docker/dev.Dockerfile
platforms: linux/amd64
push: true
tags: cubejs/cube:dev
- name: Update repo description
uses: peter-evans/dockerhub-description@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: cubejs/cube
readme-filepath: ./packages/cubejs-docker/README.md