Skip to content

Build and Push Docker Image #106

Build and Push Docker Image

Build and Push Docker Image #106

Workflow file for this run

name: Build and Push Docker Image
on:
workflow_run:
workflows: ["Sync Version"]
types:
- completed
workflow_dispatch: {}
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Get and Set Version
run: |
echo "VERSION=$(<version)" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/tooldelta:${{ env.VERSION }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/tooldelta:latest