Skip to content

Commit

Permalink
Fix syntax errors in prepare
Browse files Browse the repository at this point in the history
  • Loading branch information
jlantz committed Oct 10, 2024
1 parent 1a43c07 commit e5de50f
Showing 1 changed file with 61 additions and 61 deletions.
122 changes: 61 additions & 61 deletions .github/workflows/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,70 +69,70 @@ jobs:
"github_sha": "'${{ github.sha }}'"
}' > docker_prep_info.json
- name: Cache Docker images
id: cache-docker
uses: actions/cache@v3
with:
path: /tmp/.docker-cache
key: ${{ runner.os }}-docker-${{ steps.set_vars.outputs.full_image_name }}
restore-keys: |
${{ runner.os }}-docker-${{ steps.set_vars.outputs.docker_image }}-
- name: Cache Docker images
id: cache-docker
uses: actions/cache@v3
with:
path: /tmp/.docker-cache
key: ${{ runner.os }}-docker-${{ steps.set_vars.outputs.full_image_name }}
restore-keys: |
${{ runner.os }}-docker-${{ steps.set_vars.outputs.docker_image }}-
- name: Load cached Docker images
id: load-cache
run: |
if [ -f /tmp/.docker-cache/images.tar ]; then
docker load < /tmp/.docker-cache/images.tar
echo "cache_hit=true" >> $GITHUB_OUTPUT
else
echo "cache_hit=false" >> $GITHUB_OUTPUT
fi
- name: Load cached Docker images
id: load-cache
run: |
if [ -f /tmp/.docker-cache/images.tar ]; then
docker load < /tmp/.docker-cache/images.tar
echo "cache_hit=true" >> $GITHUB_OUTPUT
else
echo "cache_hit=false" >> $GITHUB_OUTPUT
fi
- name: Pull Docker image
id: pull-image
run: |
echo "Pulling Docker image: ${{ steps.set_vars.outputs.full_image_name }}"
docker pull ${{ steps.set_vars.outputs.full_image_name }}
docker save ${{ steps.set_vars.outputs.full_image_name }} > /tmp/.docker-cache/images.tar
- name: Pull Docker image
id: pull-image
run: |
echo "Pulling Docker image: ${{ steps.set_vars.outputs.full_image_name }}"
docker pull ${{ steps.set_vars.outputs.full_image_name }}
docker save ${{ steps.set_vars.outputs.full_image_name }} > /tmp/.docker-cache/images.tar
- name: Generate Job Summary
run: |
echo "# D2X Docker Preparation Summary" >> $GITHUB_STEP_SUMMARY
echo "## Docker Image Details" >> $GITHUB_STEP_SUMMARY
echo "- **Repository:** ${{ steps.set_vars.outputs.repo_full_name }}" >> $GITHUB_STEP_SUMMARY
echo "- **Docker Image:** ${{ steps.set_vars.outputs.docker_image }}" >> $GITHUB_STEP_SUMMARY
echo "- **Docker Tag:** ${{ steps.set_vars.outputs.full_docker_tag }}" >> $GITHUB_STEP_SUMMARY
echo "- **Full Image Name:** ${{ steps.set_vars.outputs.full_image_name }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Cache Information" >> $GITHUB_STEP_SUMMARY
echo "- **Cache Hit:** ${{ steps.load-cache.outputs.cache_hit }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Workflow Information" >> $GITHUB_STEP_SUMMARY
echo "- **Workflow Run ID:** ${{ github.run_id }}" >> $GITHUB_STEP_SUMMARY
echo "- **Workflow Run Number:** ${{ github.run_number }}" >> $GITHUB_STEP_SUMMARY
echo "- **Workflow Run Attempt:** ${{ github.run_attempt }}" >> $GITHUB_STEP_SUMMARY
echo "- **GitHub SHA:** ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
- name: Generate Job Summary
run: |
echo "# D2X Docker Preparation Summary" >> $GITHUB_STEP_SUMMARY
echo "## Docker Image Details" >> $GITHUB_STEP_SUMMARY
echo "- **Repository:** ${{ steps.set_vars.outputs.repo_full_name }}" >> $GITHUB_STEP_SUMMARY
echo "- **Docker Image:** ${{ steps.set_vars.outputs.docker_image }}" >> $GITHUB_STEP_SUMMARY
echo "- **Docker Tag:** ${{ steps.set_vars.outputs.full_docker_tag }}" >> $GITHUB_STEP_SUMMARY
echo "- **Full Image Name:** ${{ steps.set_vars.outputs.full_image_name }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Cache Information" >> $GITHUB_STEP_SUMMARY
echo "- **Cache Hit:** ${{ steps.load-cache.outputs.cache_hit }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Workflow Information" >> $GITHUB_STEP_SUMMARY
echo "- **Workflow Run ID:** ${{ github.run_id }}" >> $GITHUB_STEP_SUMMARY
echo "- **Workflow Run Number:** ${{ github.run_number }}" >> $GITHUB_STEP_SUMMARY
echo "- **Workflow Run Attempt:** ${{ github.run_attempt }}" >> $GITHUB_STEP_SUMMARY
echo "- **GitHub SHA:** ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
if [ "${{ inputs.debug }}" == "true" ]; then
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Debug Information" >> $GITHUB_STEP_SUMMARY
echo "Debug mode is enabled. Additional information:" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`json" >> $GITHUB_STEP_SUMMARY
cat docker_prep_info.json >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
fi
if [ "${{ inputs.debug }}" == "true" ]; then
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Debug Information" >> $GITHUB_STEP_SUMMARY
echo "Debug mode is enabled. Additional information:" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`json" >> $GITHUB_STEP_SUMMARY
cat docker_prep_info.json >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
fi
- name: Upload Docker Prep Info Artifact
uses: actions/upload-artifact@v3
with:
name: docker-prep-info
path: docker_prep_info.json
retention-days: 5
- name: Upload Docker Prep Info Artifact
uses: actions/upload-artifact@v3
with:
name: docker-prep-info
path: docker_prep_info.json
retention-days: 5

- name: D2X Image Details
run: |
echo "Debug mode enabled"
echo "REPO_FULL_NAME: ${{ steps.set_vars.outputs.repo_full_name }}"
echo "DOCKER_IMAGE: ${{ steps.set_vars.outputs.docker_image }}"
echo "FULL_DOCKER_TAG: ${{ steps.set_vars.outputs.full_docker_tag }}"
echo "FULL_IMAGE_NAME: ${{ steps.set_vars.outputs.full_image_name }}"
- name: D2X Image Details
run: |
echo "Debug mode enabled"
echo "REPO_FULL_NAME: ${{ steps.set_vars.outputs.repo_full_name }}"
echo "DOCKER_IMAGE: ${{ steps.set_vars.outputs.docker_image }}"
echo "FULL_DOCKER_TAG: ${{ steps.set_vars.outputs.full_docker_tag }}"
echo "FULL_IMAGE_NAME: ${{ steps.set_vars.outputs.full_image_name }}"

0 comments on commit e5de50f

Please sign in to comment.