Skip to content

Publish Docker Image #9

Publish Docker Image

Publish Docker Image #9

Workflow file for this run

name: Publish Docker Image
on:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker Image to Docker Hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker image
run: docker build -f ./Dockerfile --build-arg application_version=${{ github.ref_name }} -t ${{ secrets.DOCKER_USERNAME }}/kanbancord:${{ github.ref_name }} .
- name: Push to Registry
run: |
docker push ${{ secrets.DOCKER_USERNAME }}/kanbancord:${{ github.ref_name }}
docker tag ${{ secrets.DOCKER_USERNAME }}/kanbancord:${{ github.ref_name }} ${{ secrets.DOCKER_USERNAME }}/kanbancord:latest
docker push ${{ secrets.DOCKER_USERNAME }}/kanbancord:latest