Skip to content

Update main.yml

Update main.yml #4

Workflow file for this run

name: Pull and Push MySQL Docker Image
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin
- name: Pull MySQL image from Docker Hub
run: docker pull mysql:latest
- name: Tag MySQL image for private registry
run: docker tag mysql:latest 116.198.201.187:5000/mysql:latest
- name: Push MySQL image to private registry
run: docker push 116.198.201.187:5000/mysql:latest