From 90726c09341fbe6da72385b9944a5fd60316213f Mon Sep 17 00:00:00 2001 From: Sebastien Iooss Date: Fri, 12 Jan 2024 09:38:44 +0100 Subject: [PATCH] feat: add github action to build and push docker images --- .github/workflows/publish_docker.yml | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/publish_docker.yml diff --git a/.github/workflows/publish_docker.yml b/.github/workflows/publish_docker.yml new file mode 100644 index 0000000..2f4c90e --- /dev/null +++ b/.github/workflows/publish_docker.yml @@ -0,0 +1,34 @@ +name: Publish Docker image + +on: + push: + tags: + - "*" + +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push Docker cli image + uses: docker/build-push-action@v5 + with: + context: . + file: ./cli.Dockerfile + push: true + tags: netmist/give-me-the-odds${{ github.ref_name }} + - name: Build and push Docker server image + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + push: true + tags: netmist/millennium-falcon${{ github.ref_name }}