From a096684c69bd121ba5e60f682e236f621f0e343b Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Wed, 6 Dec 2023 01:55:11 +0100 Subject: [PATCH] github: devcontainer support force build parameter [skip ci] --- .github/workflows/devcontainer.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/devcontainer.yaml b/.github/workflows/devcontainer.yaml index 3321b4feec4..bfecd095f55 100644 --- a/.github/workflows/devcontainer.yaml +++ b/.github/workflows/devcontainer.yaml @@ -7,6 +7,11 @@ name: build devcontainer image - master # Allows you to run this workflow manually from the Actions tab workflow_dispatch: + inputs: + force: + required: true + type: boolean + default: false env: DIST: bookworm @@ -26,12 +31,14 @@ jobs: run: echo ${{ github.sha }} - name: Get changed files + if: ${{ ! inputs.force }} id: changed-files uses: tj-actions/changed-files@v40 with: since_last_remote_commit: true - name: changes in relevant files + if: ${{ ! inputs.force }} id: changed-files-builder uses: tj-actions/changed-files@v40 with: @@ -40,7 +47,7 @@ jobs: pkg/kamailio/deb/${{ env.DIST }}/** - name: Login to GitHub Container Registry - if: steps.changed-files-builder.outputs.any_changed == 'true' + if: steps.changed-files-builder.outputs.any_changed == 'true' || inputs.force uses: docker/login-action@v3 with: registry: ghcr.io @@ -48,7 +55,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Pre-build dev container image - if: steps.changed-files-builder.outputs.any_changed == 'true' + if: steps.changed-files-builder.outputs.any_changed == 'true' || inputs.force uses: devcontainers/ci@v0.3 with: imageName: ghcr.io/${{ github.repository_owner }}/kamailio-${{ github.ref_name }}-devcontainer