Skip to content

Release workflow upload fixes #5858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/build-oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,16 @@ jobs:
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index

- name: Check if base images exist
id: base_exists
- name: Set base name variable
id: base_name
run: |
base_image="gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-base/oss:${{ inputs.base-image-md5 }}-${{ inputs.image }}"
echo "image=${base_image}" >> $GITHUB_OUTPUT
if docker manifest inspect ${base_image}; then

- name: Check if base images exist
id: base_exists
run: |
if docker manifest inspect ${{ steps.base_name.outputs.image }}; then
echo "exists=true" >> $GITHUB_OUTPUT
fi
if: ${{ inputs.authenticated && ! inputs.full-build }}
Expand All @@ -121,7 +125,7 @@ jobs:
context: "."
cache-to: type=gha,scope=${{ inputs.image }},mode=max
target: common
tags: ${{ steps.base_exists.outputs.image }}
tags: ${{ steps.base_name.outputs.image }}
platforms: ${{ inputs.platforms }}
pull: true
push: true
Expand Down Expand Up @@ -175,7 +179,7 @@ jobs:
provenance: false
build-args: |
BUILD_OS=${{ inputs.image }}
${{ inputs.authenticated && format('PREBUILT_BASE_IMG={0}', steps.base_exists.outputs.image) }}
${{ inputs.authenticated && format('PREBUILT_BASE_IMG={0}', steps.base_name.outputs.image) }}
IC_VERSION=${{ inputs.ic-version && inputs.ic-version || steps.meta.outputs.version }}
if: ${{ steps.base_exists.outputs.exists != 'true' || steps.target_exists.outputs.exists != 'true' }}

Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/build-plus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,16 @@ jobs:
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index

- name: Check if base images exist
id: base_exists
- name: Set base name variable
id: base_name
run: |
base_image="gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-base/plus:${{ inputs.base-image-md5 }}-${{ inputs.image }}${{ steps.nap_modules.outputs.name != '' && format('-{0}', steps.nap_modules.outputs.name) || '' }}${{ contains(inputs.image, 'v5') && '-v5' || '' }}"
echo "image=${base_image}" >> $GITHUB_OUTPUT
if docker pull ${base_image}; then

- name: Check if base images exist
id: base_exists
run: |
if docker pull ${{ steps.base_name.outputs.image }}; then
echo "exists=true" >> $GITHUB_OUTPUT
fi
if: ${{ inputs.authenticated && ! inputs.full-build }}
Expand All @@ -126,7 +130,7 @@ jobs:
context: "."
cache-to: type=gha,scope=${{ inputs.image }}${{ steps.nap_modules.outputs.name != '' && format('-{0}', steps.nap_modules.outputs.name) || '' }},mode=max
target: common
tags: ${{ steps.base_exists.outputs.image }}
tags: ${{ steps.base_name.outputs.image }}
platforms: ${{ inputs.platforms }}
pull: true
push: true
Expand Down Expand Up @@ -185,7 +189,7 @@ jobs:
provenance: false
build-args: |
BUILD_OS=${{ inputs.image }}
${{ inputs.authenticated && format('PREBUILT_BASE_IMG={0}', steps.base_exists.outputs.image ) }}
${{ inputs.authenticated && format('PREBUILT_BASE_IMG={0}', steps.base_name.outputs.image ) }}
IC_VERSION=${{ inputs.ic-version && inputs.ic-version || steps.meta.outputs.version }}
${{ inputs.nap-modules != '' && format('NAP_MODULES={0}', steps.nap_modules.outputs.name) || '' }}
${{ (contains(inputs.target, 'aws') && inputs.nap-modules != '') && format('NAP_MODULES_AWS={0}', steps.nap_modules.outputs.modules) || '' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# clobber overwrites existing assets of the same name
run: |
if ! ${{ inputs.dry_run }}
if ! ${{ inputs.dry_run }}; then
gh release upload --clobber v${{ inputs.nic_version }} \
$(find ./tarballs -type f)
else
Expand Down
Loading