diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 695987a62..12d3e0722 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -2,12 +2,22 @@ name: Build tsbs docker image manually on: workflow_dispatch: + inputs: + commitsha: + description: 'Commit sha to build image' + required: true + type: string jobs: docker: name: Build and push image runs-on: ubuntu-22.04 steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ inputs.commitsha }} + - name: Set up QEMU uses: docker/setup-qemu-action@v2 @@ -27,14 +37,15 @@ jobs: - name: Configure build image tag shell: bash run: | - commitShortSHA=`echo ${GITHUB_SHA} | cut -c1-8` + commitShortSHA=`echo ${{ inputs.commitsha }} | cut -c1-8` buildTime=`date +%Y%m%d%H%M%S` IMAGE_TAG="$commitShortSHA-$buildTime" echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV - name: Build and push image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: + context: . file: ./Dockerfile platforms: linux/amd64,linux/arm64 push: true