Skip to content

Merge pull request #50 from wwt/dependabot/pip/idna-3.7 #16

Merge pull request #50 from wwt/dependabot/pip/idna-3.7

Merge pull request #50 from wwt/dependabot/pip/idna-3.7 #16

---
# Publish Docker Image to Docker Hub
name: Docker Hub Deployment
on:
push:
branches:
- main
jobs:
docker_build:
runs-on: ubuntu-latest
env:
IMAGE_TAG: wwt01/dcauto-study-resources:latest
GITHUB_BRANCH: refs/heads/main
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: Display the repo branch name that triggered the GitHub Action
if: ${{ github.ref }}
run: echo ${{ github.ref }}
- name: Build and push Docker Image
if: ${{ github.ref == env.GITHUB_BRANCH }}
id: docker_build
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ env.IMAGE_TAG }}
- name: Display Docker Image digest
run: echo Image digest - ${{ steps.docker_build.outputs.digest }}