-
Notifications
You must be signed in to change notification settings - Fork 8
32 lines (30 loc) · 1.18 KB
/
docker-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
name: Build and Publish Docker Image (Release)
on:
release:
types: [released]
jobs:
call-workflow-build:
uses: OpenOlitor/openolitor-client-admin/.github/workflows/grunt-build.yml@prod
docker:
name: Build Docker Image ($Version and latest)
needs: call-workflow-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: client-admin-dist
path: client-admin-dist/
- name: Set env
run: echo VERSION=$(node -p "require('./package.json').version") >> $GITHUB_ENV
- name: Docker Login
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Build Docker Image (versioned)
run: docker build . -t openolitor/openolitor-client-admin:$VERSION
- name: Publish Docker Image (versioned)
run: docker push openolitor/openolitor-client-admin:$VERSION
- name: Build Docker Image (latest)
run: docker build . -t openolitor/openolitor-client-admin:latest
- name: Publish Docker Image (latest)
run: docker push openolitor/openolitor-client-admin:latest