diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 708e02ac..07975bd3 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -11,7 +11,6 @@ jobs: runs-on: ubuntu-latest env: GITHUB_URL: https://github.com/${{ github.repository }} - ADD_CHROME_VERSION: 127 IMAGE: ulixee/ulixee-cloud steps: @@ -22,6 +21,21 @@ jobs: working-directory: cloud/main run: export VERSION=$(node -p "require('./package.json').version") && echo "VERSION=$VERSION" >> $GITHUB_ENV + - name: Install yarn packages + run: yarn install + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Determine Chrome Versions + shell: bash + run: | + CHROME_PACKAGE=$(yarn list --pattern '@ulixee/chrome-' --depth=0 | grep '@ulixee/chrome-' | grep -Eo 'chrome-[0-9]+-0' | head -1) + + CHROME_VERSION=$(echo $CHROME_PACKAGE | awk -F'-' '{print $2}') + PREVIOUS_CHROME_VERSION=$((CHROME_VERSION - 1)) + + echo "ADD_CHROME_VERSION=$PREVIOUS_CHROME_VERSION" >> $GITHUB_ENV + - name: Login to GitHub Container Registry uses: docker/login-action@v2 with: