Skip to content

v1.5.0

v1.5.0 #74

name: Publish Image to DockerHub
on:
workflow_dispatch:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: DockerHub Login
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Read YAML file for version
uses: pietrobolcato/[email protected]
id: read_yaml
with:
config: ${{ github.workspace }}/version.yaml
- name: Build the Docker image
run: docker build . --file Dockerfile --tag ${{ secrets.DOCKERHUB_USERNAME }}/devops:${{ steps.read_yaml.outputs['version'] }}
- name: Docker Push
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/devops:${{ steps.read_yaml.outputs['version'] }}