From b97c711aa553b194fdbc8de6c3a4e369192e9c8b Mon Sep 17 00:00:00 2001 From: Artem Makhortov <13339874+artmakh@users.noreply.github.com> Date: Wed, 7 Jun 2023 15:38:33 +0700 Subject: [PATCH] CI add manual build and push data-restore docker image (#2369) --- .github/actions/build-data-restore-docker.yml | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/actions/build-data-restore-docker.yml diff --git a/.github/actions/build-data-restore-docker.yml b/.github/actions/build-data-restore-docker.yml new file mode 100644 index 0000000000..f164abb6f2 --- /dev/null +++ b/.github/actions/build-data-restore-docker.yml @@ -0,0 +1,42 @@ +name: Build and Push Data-restore docker Image +on: + workflow_dispatch: + inputs: + ref: + description: 'Ref to build from' + required: true + default: 'dev' + +jobs: + build-push-image: + runs-on: [self-hosted, ci-runner] + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + ref: ${{ github.event.inputs.ref }} + + - name: Set outputs + id: vars + run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + id: docker_build_push + uses: docker/build-push-action@v3 + with: + push: true + context: ./docker/data-restore + tags: | + matterlabs/data-restore:${{ steps.vars.outputs.sha_short }} + matterlabs/data-restore:latest