diff --git a/.github/actions/docker-build-artifacts/action.yml b/.github/actions/docker-build-artifacts/action.yml index 026b0131..9a15868b 100644 --- a/.github/actions/docker-build-artifacts/action.yml +++ b/.github/actions/docker-build-artifacts/action.yml @@ -57,6 +57,8 @@ runs: --secret id=DEPLOYMENT_TOKEN,env=DEPLOYMENT_TOKEN \ --tag artifacts-${GITHUB_RUN_ID}:${GITHUB_SHA} \ --ulimit nofile=1024000:1024000 \ + --force-rm \ + --pull \ . 2>&1 | tee -a ${{ inputs.BUILD_LOG_FILENAME }} - name: Extract artifacts from image diff --git a/.github/workflows/cicd-docker-build-and-distribute.yml b/.github/workflows/cicd-docker-build-and-distribute.yml index 49fc0c32..62df026d 100644 --- a/.github/workflows/cicd-docker-build-and-distribute.yml +++ b/.github/workflows/cicd-docker-build-and-distribute.yml @@ -3,6 +3,10 @@ name: Build and Distribute (via Docker) on: workflow_call: inputs: + REF: + required: false + description: The branch, tag or SHA to checkout + type: string ENVIRONMENT: required: false type: string @@ -104,10 +108,18 @@ jobs: id-token: write environment: ${{ inputs.ENVIRONMENT }} steps: - - name: Checkout code + if: ${{ inputs.REF == '' }} + uses: actions/checkout@v4 + with: + fetch-depth: 0 + path: ${{ inputs.CODE_WORKING_DIRECTORY }} + + - name: Checkout code by REF + if: ${{ inputs.REF != '' }} uses: actions/checkout@v4 with: + ref: ${{ inputs.REF }} fetch-depth: 0 path: ${{ inputs.CODE_WORKING_DIRECTORY }}