Skip to content

Commit bb0ac51

Browse files
committed
Update Dockerfile with Selenium version
1 parent 8ba0671 commit bb0ac51

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/auto-update.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,17 @@ jobs:
6060
MAJOR_VERSION=${{ steps.chromium-versions.outputs.MAJOR_VERSION }}
6161
DRIVER_VERSION=$(curl "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${MAJOR_VERSION}")
6262
echo "DRIVER_VERSION=${DRIVER_VERSION}" >> $GITHUB_OUTPUT
63+
- name: Update Selenium
64+
id: selenium-version
65+
run: |
66+
echo "SELENIUM_VERSION=$(curl -s https://pypi.org/pypi/selenium/json | jq -r .info.version)" >> $GITHUB_OUTPUT
6367
- name: Update Dockerfile
6468
run: |
6569
SHA256_DIGEST=${{ steps.docker-image-digest.outputs.SHA256_DIGEST }}
6670
POSITION=${{ steps.chromium-versions.outputs.POSITION }}
6771
DRIVER_VERSION=${{ steps.chromedriver-version.outputs.DRIVER_VERSION }}
68-
sed -r "s/public.ecr.aws\/lambda\/python[:@a-z0-9]+/public.ecr.aws\/lambda\/python\@sha256\:${SHA256_DIGEST}/g; s/chromedriver.storage.googleapis.com\/[0-9.]+/chromedriver.storage.googleapis.com\/${DRIVER_VERSION}/g; s/Linux_x64%2F[0-9]+%2Fchrome-linux.zip/Linux_x64%2F${POSITION}%2Fchrome-linux.zip/g" -i Dockerfile
72+
SELENIUM_VERSION=${{ steps.selenium-version.outputs.SELENIUM_VERSION }}
73+
sed -r "s/public.ecr.aws\/lambda\/python[:@a-z0-9]+/public.ecr.aws\/lambda\/python\@sha256\:${SHA256_DIGEST}/g; s/chromedriver.storage.googleapis.com\/[0-9.]+/chromedriver.storage.googleapis.com\/${DRIVER_VERSION}/g; s/Linux_x64%2F[0-9]+%2Fchrome-linux.zip/Linux_x64%2F${POSITION}%2Fchrome-linux.zip/g; s/selenium==[0-9\.]*/selenium==${SELENIUM_VERSION}/g" -i Dockerfile
6974
- name: Deploy
7075
run: sls deploy
7176
env:
@@ -77,11 +82,6 @@ jobs:
7782
run: |
7883
CHROME_VERSION=$(docker run --rm --entrypoint '' serverless-docker-selenium-lambda-prod:img /opt/chrome/chrome --version | awk '{print $2}' | sed -e 's/^[[:space:]]*//')
7984
echo "CHROME_VERSION=${CHROME_VERSION}" >> $GITHUB_OUTPUT
80-
- name: Note selenium version
81-
id: selenium-version
82-
run: |
83-
SELENIUM_VERSION=$(docker run --rm --entrypoint '' serverless-docker-selenium-lambda-prod:img pip freeze | grep selenium | awk -F "==" '{print $2}')
84-
echo "SELENIUM_VERSION=${SELENIUM_VERSION}" >> $GITHUB_OUTPUT
8585
- name: Note python version
8686
id: python-version
8787
run: |

0 commit comments

Comments
 (0)