From 7baf1b25916555fe568ad73fd85add55c600499d Mon Sep 17 00:00:00 2001 From: Wes Shaddix Date: Thu, 21 Nov 2024 09:21:10 -0500 Subject: [PATCH] adding github action to build and publish docker image --- .github/workflows/publish-docker-image.yaml | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/publish-docker-image.yaml diff --git a/.github/workflows/publish-docker-image.yaml b/.github/workflows/publish-docker-image.yaml new file mode 100644 index 0000000..cddad07 --- /dev/null +++ b/.github/workflows/publish-docker-image.yaml @@ -0,0 +1,25 @@ +name: ci + +on: + push: + tags: + - '*' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - 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: Build and push + - uses: docker/build-push-action@v6 + - with: + push: true + tags: wshaddix/http-nats-proxy:${{github.ref_name}} \ No newline at end of file