Skip to content

Commit

Permalink
CI add manual build and push data-restore docker image (#2369)
Browse files Browse the repository at this point in the history
  • Loading branch information
artmakh authored Jun 7, 2023
1 parent a2271a4 commit b97c711
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/actions/build-data-restore-docker.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b97c711

Please sign in to comment.