WorkflowEngine - Build and Publish to Docker #57
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: WorkflowEngine - Build and Publish to Docker | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'WorkflowEngine/**' | |
- '.github/workflows/workflowengine.yml' | |
schedule: | |
- cron: '0 1 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Read current version | |
id: read_property | |
uses: christian-draeger/read-properties@1.0.0 | |
with: | |
path: './WorkflowEngine/VERSION' | |
property: 'version' | |
token: ${{ secrets.TOKEN }} | |
- name: Current version | |
run: echo ${{ steps.read_property.outputs.value }} | |
- name: Bump release version | |
id: bump_version | |
uses: christian-draeger/increment-semantic-version@1.0.0 | |
with: | |
current-version: ${{ steps.read_property.outputs.value }} | |
version-fragment: 'bug' | |
- name: New version | |
run: echo ${{ steps.bump_version.outputs.next-version }} | |
- name: Remove existing version file | |
uses: JesseTG/rm@v1.0.0 | |
with: | |
path: './WorkflowEngine/VERSION' | |
- name: Write new version | |
uses: christian-draeger/write-properties@1.0.0 | |
with: | |
path: './WorkflowEngine/VERSION' | |
property: 'version' | |
value: ${{ steps.bump_version.outputs.next-version }} | |
- name: Publish to pkalkman/mve-workflowengine on Docker Hub | |
uses: elgohr/Publish-Docker-Github-Action@master | |
with: | |
name: pkalkman/mve-workflowengine | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
dockerfile: ./WorkflowEngine/Dockerfile | |
context: ./WorkflowEngine/ | |
tags: ${{ steps.bump_version.outputs.next-version }} | |
- name: Git auto commit | |
uses: stefanzweifel/git-auto-commit-action@v4.13.1 | |
with: | |
message: 'Updated version to ${{ steps.bump_version.outputs.next-version }}' | |
- name: Slack Notification | |
uses: rtCamp/action-slack-notify@v2.0.0 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_MESSAGE: 'A new version of WorkflowEngine (${{ steps.bump_version.outputs.next-version }}) was build and published to Docker Hub' | |