From 3476a43b9adffcba4c68ff0c99491c655b139eab Mon Sep 17 00:00:00 2001 From: Dimitrios Giakatos Date: Tue, 7 Jan 2025 14:05:22 +0900 Subject: [PATCH] add action for pushing docker image --- .github/workflows/push-docker-image.yml | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/push-docker-image.yml diff --git a/.github/workflows/push-docker-image.yml b/.github/workflows/push-docker-image.yml new file mode 100644 index 00000000..f84ddd0f --- /dev/null +++ b/.github/workflows/push-docker-image.yml @@ -0,0 +1,27 @@ +name: Push Docker Image + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build Docker image + run: | + docker build -t internethealthreport/ihr-website:${{ github.ref_name }} . + + - name: Push Docker image + run: | + docker push internethealthreport/ihr-website:${{ github.ref_name }}