Skip to content

Commit 241c189

Browse files
chore(ci): update nightly workflow to fetch latest podman version (#3933)
Signed-off-by: serbangeorge-m <[email protected]>
1 parent 6aa77a8 commit 241c189

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

.github/workflows/ai-lab-e2e-nightly-windows.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ on:
4646
description: 'npm target to run tests'
4747
type: string
4848
required: true
49-
podman_remote_url:
50-
default: 'https://github.com/containers/podman/releases/download/v5.6.1/podman-5.6.1-setup.exe'
51-
description: 'podman remote setup exe'
49+
podman_version:
50+
default: 'latest'
51+
description: 'Podman version (use "latest" to auto-fetch latest release, or specify version like "v5.6.1")'
5252
type: string
5353
required: true
5454
podman_options:
@@ -95,11 +95,13 @@ jobs:
9595

9696

9797
steps:
98-
- name: Get Podman version used by Desktop
99-
run: |
100-
version=$(curl https://raw.githubusercontent.com/containers/podman-desktop/main/extensions/podman/packages/extension/src/podman5.json | jq -r '.version')
101-
echo "Default Podman Version from Podman Desktop: ${version}"
102-
echo "PD_PODMAN_VERSION=${version}" >> $GITHUB_ENV
98+
- name: Fetch latest Podman version
99+
id: fetch-podman
100+
uses: redhat-actions/podman-install/.github/actions/fetch-latest-podman-version-windows@6b757b792b67ec663765a4f2ca36226e12b2f4cd
101+
with:
102+
version_input: ${{ github.event.inputs.podman_version || 'latest' }}
103+
file_type: 'setup.exe'
104+
github_token: ${{ secrets.GITHUB_TOKEN }}
103105

104106
- name: Set the default env. variables
105107
env:
@@ -110,13 +112,11 @@ jobs:
110112
DEFAULT_PODMAN_OPTIONS: 'INIT=1,START=1,ROOTFUL=1,NETWORKING=0'
111113
DEFAULT_EXT_TESTS_OPTIONS: 'EXT_RUN_TESTS_FROM_EXTENSION=1,EXT_RUN_TESTS_AS_ADMIN=1,EXT_TEST_GPU_SUPPORT_ENABLED=0'
112114
DEFAULT_EXT_REPO_OPTIONS: 'REPO=podman-desktop-extension-ai-lab,FORK=containers,BRANCH=main'
113-
DEFAULT_PODMAN_VERSION: "${{ env.PD_PODMAN_VERSION || '5.6.1' }}"
114-
DEFAULT_URL: "https://github.com/containers/podman/releases/download/v$DEFAULT_PODMAN_VERSION/podman-$DEFAULT_PODMAN_VERSION-setup.exe"
115115
DEFAULT_PDE2E_IMAGE_VERSION: 'v0.0.3'
116116
run: |
117117
echo "NPM_TARGET=${{ github.event.inputs.npm_target || env.DEFAULT_NPM_TARGET }}" >> $GITHUB_ENV
118118
echo "ENV_VARS=${{ github.event.inputs.env_vars || env.DEFAULT_ENV_VARS }}" >> $GITHUB_ENV
119-
echo "PODMAN_URL=${{ github.event.inputs.podman_remote_url || env.DEFAULT_URL }}" >> $GITHUB_ENV
119+
echo "PODMAN_URL=${{ steps.fetch-podman.outputs.download_url }}" >> $GITHUB_ENV
120120
echo "PDE2E_IMAGE_VERSION=${{ github.event.inputs.pde2e_image_version || env.DEFAULT_PDE2E_IMAGE_VERSION }}" >> $GITHUB_ENV
121121
echo "${{ github.event.inputs.podman_desktop_repo_args || env.DEFAULT_PODMAN_DESKTOP_REPO_ARGS }}" | awk -F ',' \
122122
'{for (i=1; i<=NF; i++) {split($i, kv, "="); print "PD_"kv[1]"="kv[2]}}' >> $GITHUB_ENV

0 commit comments

Comments
 (0)