Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |