-
Notifications
You must be signed in to change notification settings - Fork 14
43 lines (35 loc) · 1.13 KB
/
build.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
name: Build Docker Image
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref_protected == 'true' && github.sha || github.ref }}-{{ github.event_name }}
cancel-in-progress: true
jobs:
build-docker-image:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Add SHORT_SHA env property with commit short sha
run: |
SHORT_SHA=$(git rev-parse --short ${{ github.event.pull_request.head.sha }})
echo "SHORT_SHA=$SHORT_SHA" >> $GITHUB_ENV
echo "Short SHA: $SHORT_SHA"
- name: Make docker image
working-directory: .
run: make docker-build
env:
ETLHASH: stellar/stellar-etl-dev:${SHORT_SHA}
- name: Login to DockerHub
uses: docker/login-action@bb984efc561711aaa26e433c32c3521176eae55b
with:
username: stellardataeng
password: ${{ secrets.DOCKER_CREDS_DEV }}
- name: Push docker image
working-directory: .
run: docker push stellar/stellar-etl-dev:${SHORT_SHA}