Skip to content

Commit

Permalink
Update $VERSION to $CHR_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
uazo authored Oct 26, 2023
1 parent 86fc1fe commit e614ce6
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
- cron: '0 1 * * *'

env:
VERSION: ${{ github.event.inputs.version }}
CHR_VERSION: ${{ github.event.inputs.version }}
NEW_VERSION: ${{ null }}

name: Builds and pushes tagged image to DockerHub
Expand Down Expand Up @@ -72,45 +72,45 @@ jobs:
- name: Check versions
shell: bash
run: |
if [ -z $VERSION ]; then
VERSION=$(curl -s https://omahaproxy.appspot.com/all.json | jq '.[] | select(.os | contains("win64")) | .versions[] | select(.channel | contains("stable")) | .current_version' | xargs)
echo "VERSION=$VERSION" >> $GITHUB_ENV
if [ -z $CHR_VERSION ]; then
CHR_VERSION=$(curl -s https://omahaproxy.appspot.com/all.json | jq '.[] | select(.os | contains("win64")) | .versions[] | select(.channel | contains("stable")) | .current_version' | xargs)
echo "CHR_VERSION=$CHR_VERSION" >> $GITHUB_ENV
fi
- name: Building build-deps container ${{ env.VERSION }}
shell: bash
run: |
IS_PRESENT=$(docker inspect --type=image uazo/build-deps:$VERSION > /dev/null ; echo $?)
IS_PRESENT=$(docker inspect --type=image uazo/build-deps:$CHR_VERSION > /dev/null ; echo $?)
if [ $IS_PRESENT -ne "0" ]; then
IS_PRESENT=$(docker manifest inspect uazo/build-deps:$VERSION > /dev/null ; echo $?)
IS_PRESENT=$(docker manifest inspect uazo/build-deps:$CHR_VERSION > /dev/null ; echo $?)
if [ $IS_PRESENT -ne "0" ]; then
DOCKER_BUILDKIT=1 docker build -t uazo/build-deps:$VERSION \
DOCKER_BUILDKIT=1 docker build -t uazo/build-deps:$CHR_VERSION \
--progress plain \
--build-arg VERSION=$VERSION \
--build-arg VERSION=$CHR_VERSION \
--build-arg HTTP_PROXY="$PROXY_ADDR" \
--no-cache \
cromite/tools/images/build-deps/.
docker push uazo/build-deps:$VERSION
echo "NEW_VERSION=$VERSION" >> $GITHUB_ENV
docker push uazo/build-deps:$CHR_VERSION
echo "NEW_VERSION=$CHR_VERSION" >> $GITHUB_ENV
fi
fi
- name: Building chromium container ${{ env.VERSION }}
shell: bash
run: |
IS_PRESENT=$(docker inspect --type=image uazo/chromium:$VERSION > /dev/null ; echo $?)
IS_PRESENT=$(docker inspect --type=image uazo/chromium:$CHR_VERSION > /dev/null ; echo $?)
if [ $IS_PRESENT -ne "0" ]; then
IS_PRESENT=$(docker manifest inspect uazo/chromium:$VERSION > /dev/null ; echo $?)
IS_PRESENT=$(docker manifest inspect uazo/chromium:$CHR_VERSION > /dev/null ; echo $?)
if [ $IS_PRESENT -ne "0" ]; then
DOCKER_BUILDKIT=1 docker build -t uazo/chromium:$VERSION \
DOCKER_BUILDKIT=1 docker build -t uazo/chromium:$CHR_VERSION \
--progress plain \
--build-arg VERSION=$VERSION \
--build-arg VERSION=$CHR_VERSION \
--build-arg HTTP_PROXY="$PROXY_ADDR" \
cromite/tools/images/chr-source/.
docker push uazo/chromium:$VERSION
echo "NEW_VERSION=$VERSION" >> $GITHUB_ENV
docker push uazo/chromium:$CHR_VERSION
echo "NEW_VERSION=$CHR_VERSION" >> $GITHUB_ENV
fi
fi
Expand All @@ -124,4 +124,4 @@ jobs:
cd cromite/tools
echo ${{ secrets.GITHUB_TOKEN }} | $GH auth login --with-token
$GH issue create -t "$VERSION: new chromium version" -b ""
$GH issue create -t "$CHR_VERSION: new chromium version" -b ""

0 comments on commit e614ce6

Please sign in to comment.