forked from geonetwork/geonetwork-ui
-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (39 loc) · 1.56 KB
/
datafeeder.yaml
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
name: Build
on:
push:
branches:
- georchestra-datafeeder
tags:
- '*'
jobs:
build:
if: github.repository == 'georchestra/geonetwork-ui'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: 'Checking out'
uses: actions/checkout@v1
- name: Install dependencies
run: npm ci
- name: Getting image tag
if: github.repository == 'georchestra/geonetwork-ui'
id: version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: 'Building docker image'
if: github.repository == 'georchestra/geonetwork-ui'
run: npx nx docker-build datafeeder
- name: 'Logging in to docker.io'
if: github.repository == 'georchestra/geonetwork-ui'
uses: azure/docker-login@v1
with:
username: '${{ secrets.DOCKER_HUB_USERNAME }}'
password: '${{ secrets.DOCKER_HUB_PASSWORD }}'
- name: 'Pushing latest docker image onto docker.io'
if: github.ref == 'refs/heads/georchestra-datafeeder' && github.repository == 'georchestra/geonetwork-ui'
run: |
docker push georchestra/datafeeder-frontend:latest
- name: 'Pushing release docker image to docker.io'
if: contains(github.ref, 'refs/tags/') && github.repository == 'georchestra/geonetwork-ui'
run: |
docker tag georchestra/datafeeder-frontend:latest georchestra/datafeeder-frontend:${{ steps.version.outputs.VERSION }}
docker push georchestra/datafeeder-frontend:${{ steps.version.outputs.VERSION }}