This commit is contained in:
2023-03-25 22:11:42 -07:00
parent 47f9261403
commit 22122a4499

View File

@@ -42,13 +42,18 @@ runs:
platform: ${{ inputs.platform }} platform: ${{ inputs.platform }}
- name: "Pull Unity container." - name: "Pull Unity container."
run: | run: |
CONTAINER=${{ steps.getContainer.outputs.container }} CONTAINER="${{ steps.getContainer.outputs.container }}"
CACHED_CONTAINER="$CONTAINER-activated"
if [[ -z "$(docker image ls | grep $CACHED_CONTAINER)" ]]; then
# Activate the license on build. # Activate the license on build.
DOCKER_BUILDKIT=1 \ DOCKER_BUILDKIT=1 \
SERIAL="${{ inputs.serial }}" USERNAME="${{ inputs.email }}" PASSWORD="${{ inputs.password }}" \ SERIAL="${{ inputs.serial }}" USERNAME="${{ inputs.email }}" PASSWORD="${{ inputs.password }}" \
docker build --secret id=SERIAL,env=SERIAL --secret id=USERNAME,env=USERNAME --secret id=PASSWORD,env=PASSWORD \ docker build --secret id=SERIAL,env=SERIAL --secret id=USERNAME,env=USERNAME --secret id=PASSWORD,env=PASSWORD \
-t ${{ inputs.imageTag }} --build-arg IMAGE=$CONTAINER ${{ github.action_path }} -t $CACHED_CONTAINER --build-arg IMAGE=$CONTAINER ${{ github.action_path }}
fi
docker tag $CACHED_CONTAINER ${{ inputs.imageTag }}
shell: bash shell: bash
- name: "Run Unity command." - name: "Run Unity command."
uses: act/unity/unity@master uses: act/unity/unity@master