From 620e39a761b4775a3d6472514e6b798154dcd981 Mon Sep 17 00:00:00 2001 From: GyroGearl00se <94406798+GyroGearl00se@users.noreply.github.com> Date: Fri, 14 Jun 2024 17:10:26 +0200 Subject: [PATCH] Create docker-image.yml --- .github/workflows/docker-image.yml | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 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 0000000..6730242 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,34 @@ +name: Docker Image + +on: + release: + types: published + tags: + - v* + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Docker meta + id: meta + uses: crazy-max/ghaction-docker-meta@v2 + with: + images: gyrogearl00se/solacewebclient + tags: | + type=raw,value=latest,enable=${{ endsWith(GitHub.ref, 'master') }} + type=ref,event=tag + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push Docker images + uses: docker/build-push-action@v2.6.1 + with: + push: ${{ GitHub.event_name != 'pull_request' || contains(GitHub.head_ref, 'feature') }} + tags: ${{ steps.meta.outputs.tags }}