From 4de9055ec3c9e4ab2ca68ea85756580ed1e4264a Mon Sep 17 00:00:00 2001 From: Daniel Drasovean Date: Fri, 21 Jun 2024 17:01:39 +0300 Subject: [PATCH] Added action for building keygenerator docker images --- .github/workflows/deploy-docker.yaml | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/deploy-docker.yaml diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml new file mode 100644 index 00000000000..438da3ed406 --- /dev/null +++ b/.github/workflows/deploy-docker.yaml @@ -0,0 +1,40 @@ +env: + IMAGE_NODE: chain-keygenerator + REGISTRY_HOSTNAME: multiversx + +name: Build Docker image & push + +on: + workflow_dispatch: + pull_request: + +jobs: + build-docker-image: + strategy: + matrix: + runs-on: [ubuntu-latest] + runs-on: ${{ matrix.runs-on }} + + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log into Docker Hub + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push image to Docker Hub + id: push + uses: docker/build-push-action@v6 + with: + context: . + file: ./docker/keygenerator/Dockerfile + platforms: linux/amd64,linux/arm64 + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ env.REGISTRY_HOSTNAME }}/${{ env.IMAGE_NODE }}:latest