From c4b82cfa1cde403e93c7803f34bdde255b2471b7 Mon Sep 17 00:00:00 2001 From: No123567 <157853349+No123567@users.noreply.github.com> Date: Thu, 1 Feb 2024 18:00:48 -0600 Subject: [PATCH] Create docker-image.yml --- .github/workflows/docker-image.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000000..40c90d24f5 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,18 @@ +name: Publish image to Docker Hub + +on: + [workflow_dispatch] + +jobs: + publish_image: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v3 + - name: build + run: | + docker build . -t ${{ secrets.DOCKERHUB_USERNAME}}/${{ secrets.DOCKERHUB_NAME}}:latest + - name: publish + run: | + docker login -u ${{ secrets.DOCKERHUB_USERNAME}} -p ${{ secrets.DOCKERHUB_TOKEN}} + docker push ${{ secrets.DOCKERHUB_USERNAME}}/${{ secrets.DOCKERHUB_NAME}}:latest