Skip to content

WorkflowPackager Build and Publish to Docker #1093

WorkflowPackager Build and Publish to Docker

WorkflowPackager Build and Publish to Docker #1093

name: WorkflowPackager Build and Publish to Docker
on:
workflow_dispatch:
push:
paths:
- 'WorkflowPackager/**'
- '.github/workflows/workflowpackager.yml'
schedule:
- cron: '0 4 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Read current version
id: read_property
uses: christian-draeger/[email protected]
with:
path: './WorkflowPackager/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/[email protected]
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/[email protected]
with:
path: './WorkflowPackager/VERSION'
- name: Write new version
uses: christian-draeger/[email protected]
with:
path: './WorkflowPackager/VERSION'
property: 'version'
value: ${{ steps.bump_version.outputs.next-version }}
- name: Publish to pkalkman/mve-workflowpackager on Docker Hub
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: pkalkman/mve-workflowpackager
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: ./WorkflowPackager/Dockerfile
context: ./WorkflowPackager/
tags: ${{ steps.bump_version.outputs.next-version }}
- name: Git auto commit
uses: stefanzweifel/[email protected]
with:
message: 'Updated version to ${{ steps.bump_version.outputs.next-version }}'
- name: Slack Notification
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_MESSAGE: 'A new version of WorkflowPackager (${{ steps.bump_version.outputs.next-version }}) was build and published to Docker Hub'