Skip to content

Commit

Permalink
Make code more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
Slavko Rihtaric committed May 23, 2024
1 parent 140a07c commit 153c0ae
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
if: ${{ !fromJson(steps.skip-build.outputs.skip) }}
uses: actions/checkout@v4

- name: Prepare ECR Repository name variables
- name: Prepare ECR Repository variables
id: ecr
if: ${{ !fromJson(steps.skip-build.outputs.skip) }}
run: |
Expand Down Expand Up @@ -181,13 +181,12 @@ jobs:
path: ${{ inputs.artifacts_download_path }}
merge-multiple: true

- name: Docker build and push ${{ needs.tag_check.outputs.semver }}-${{ matrix.platform }} image
- name: Docker build and push ${{ env.IMAGE }}:${{ env.IMAGE_TAG }}
if: ${{ !fromJson(steps.skip-build.outputs.skip) }}
run: |
TAG=${{ env.IMAGE_TAG }}
IMAGE="${{ env.ECR_REGISTRY }}/${{ env.IMAGE }}"
docker buildx create --name DLC_builder --use
docker buildx build ${{ steps.docker-build-args.outputs.result }} -f ${{ inputs.dockerfile }} -t ${IMAGE}:${TAG} --progress plain --push --provenance false .
docker buildx build ${{ steps.docker-build-args.outputs.result }} -f ${{ inputs.dockerfile }} \
-t ${{ env.ECR_REGISTRY }}/${{ env.IMAGE }}:${{ env.IMAGE_TAG }} --progress plain --push --provenance false .
- name: Save ${{ needs.tag_check.outputs.semver }}-${{ matrix.platform }} tag
if: ${{ !fromJson(steps.skip-build.outputs.skip) }}
Expand All @@ -206,11 +205,9 @@ jobs:
- name: Extract CDN artifacts from image
if: ${{ !fromJson(steps.skip-build.outputs.skip) }} && ${{ inputs.cdn_artifacts }}
run: |
TAG=${{ env.IMAGE_TAG }}
IMAGE="${{ env.ECR_REGISTRY }}/${{ env.IMAGE }}"
docker run --rm -it -d --name temp_container ${{ inputs.cdn_docker_args }} ${IMAGE}:${TAG}
mkdir -p ${{ runner.temp }}/${{ matrix.platform }}
docker run --rm -it -d --name temp_container ${{ inputs.cdn_docker_args }} \
${{ env.ECR_REGISTRY }}/${{ env.IMAGE }}:${{ env.IMAGE_TAG }}
docker cp temp_container:${{ inputs.cdn_artifacts_docker_path }} ${{ runner.temp }}/${{ matrix.platform }}
- name: Upload CDN artifacts to S3
Expand Down

0 comments on commit 153c0ae

Please sign in to comment.