-
Notifications
You must be signed in to change notification settings - Fork 8
28 lines (26 loc) · 982 Bytes
/
docker-prepublish.yml
File metadata and controls
28 lines (26 loc) · 982 Bytes
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
name: Build and Publish Docker Image (Pre-Release)
on:
release:
types: [prereleased]
jobs:
call-workflow-build:
uses: OpenOlitor/openolitor-client-admin/.github/workflows/grunt-build.yml@prod
docker:
name: Build Docker Image ($Version only)
needs: call-workflow-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download build artifact
uses: actions/download-artifact@v4
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
run: docker build . -t openolitor/openolitor-client-admin:$VERSION
- name: Publish Docker Image (versioned)
run: docker push openolitor/openolitor-client-admin:$VERSION