update universal
This commit is contained in:
@@ -327,16 +327,25 @@ jobs:
|
|||||||
|
|
||||||
# ----- Docker steps -----
|
# ----- Docker steps -----
|
||||||
- name: Clone Upstream Code (if needed)
|
- name: Clone Upstream Code (if needed)
|
||||||
if: steps.check_commits.outputs.commit_count != '0' && steps.check_upstream.outputs.upstream_needs_update == 'true'
|
if: steps.check_commits.outputs.commit_count != '0' && (steps.check_upstream.outputs.upstream_needs_update == 'true' || steps.check_upstream.outputs.repo_url != '')
|
||||||
run: |
|
run: |
|
||||||
rm -rf upstream_src
|
rm -rf upstream_src
|
||||||
git clone --depth 1 --branch ${{ steps.check_upstream.outputs.repo_branch }} ${{ steps.check_upstream.outputs.repo_url }} upstream_src
|
git clone --depth 1 --branch ${{ steps.check_upstream.outputs.repo_branch }} ${{ steps.check_upstream.outputs.repo_url }} upstream_src
|
||||||
|
|
||||||
- name: 🔍 Check if Dockerfile exists
|
- name: 🔍 Check if Dockerfile exists
|
||||||
if: steps.check_commits.outputs.commit_count != '0' || steps.check_upstream.outputs.upstream_needs_update == 'true'
|
if: steps.check_commits.outputs.commit_count != '0' || steps.check_upstream.outputs.upstream_needs_update == 'true'
|
||||||
id: dockerfile_check
|
id: dockerfile_check
|
||||||
run: |
|
run: |
|
||||||
if [ -f Dockerfile ] || [ -f upstream_src/Dockerfile ]; then
|
if [ -n "${{ steps.check_upstream.outputs.repo_url }}" ]; then
|
||||||
|
if [ -f upstream_src/Dockerfile ]; then
|
||||||
|
echo "exists=true" >> "$GITHUB_OUTPUT"
|
||||||
|
else
|
||||||
|
# Fallback or error? User said "ignore", but we need a dockerfile to build.
|
||||||
|
# Assuming if upstream_src is present, we trust it, or fail at build time.
|
||||||
|
# Let's say exists=true and let build fail if missing, per user hint.
|
||||||
|
echo "exists=true" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
elif [ -f Dockerfile ]; then
|
||||||
echo "exists=true" >> "$GITHUB_OUTPUT"
|
echo "exists=true" >> "$GITHUB_OUTPUT"
|
||||||
else
|
else
|
||||||
echo "exists=false" >> "$GITHUB_OUTPUT"
|
echo "exists=false" >> "$GITHUB_OUTPUT"
|
||||||
@@ -363,11 +372,12 @@ jobs:
|
|||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
id: docker_build
|
id: docker_build
|
||||||
with:
|
with:
|
||||||
context: ${{ steps.check_upstream.outputs.upstream_needs_update == 'true' && './upstream_src' || '.' }}
|
context: ${{ steps.check_upstream.outputs.repo_url != '' && './upstream_src' || '.' }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
build-args: |
|
build-args: |
|
||||||
${{ steps.check_upstream.outputs.build_args }}
|
${{ steps.check_upstream.outputs.build_args }}
|
||||||
|
${{ steps.check_upstream.outputs.repo_url != '' && 'SIMPLE_MODE=true' || '' }}
|
||||||
tags: |
|
tags: |
|
||||||
git.icc.gg/${{ gitea.repository }}:latest
|
git.icc.gg/${{ gitea.repository }}:latest
|
||||||
git.icc.gg/${{ gitea.repository }}:${{ steps.version.outputs.VERSION }}
|
git.icc.gg/${{ gitea.repository }}:${{ steps.version.outputs.VERSION }}
|
||||||
|
|||||||
Reference in New Issue
Block a user