From 64a6f23dd8e25fb0faac86704d8850a5ae5e7503 Mon Sep 17 00:00:00 2001 From: Georg Wechslberger Date: Fri, 5 Jan 2024 11:55:55 +0100 Subject: [PATCH] feat: push new versions also as latest image --- .github/workflows/check-latest-tag.yml | 1 + .github/workflows/docker-image.yml | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check-latest-tag.yml b/.github/workflows/check-latest-tag.yml index eee2ba6..44b5496 100644 --- a/.github/workflows/check-latest-tag.yml +++ b/.github/workflows/check-latest-tag.yml @@ -41,6 +41,7 @@ jobs: secrets: inherit with: version: ${{needs.check_tags.outputs.latestFlutterTag}} + latest: true # Use the keepalive action to ensure the cron jobs will not be suspended after # 90 days of inactivity. diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index e8fa0ef..33a4e18 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -6,6 +6,10 @@ on: version: type: string required: false + latest: + type: boolean + required: false + default: false jobs: @@ -26,14 +30,14 @@ jobs: run: | docker build -f Dockerfile -t tauu/flutter-windows-builder:latest . - name: docker build version tag - if: ${{ inputs.version != '' }} + if: ${{ inputs.version != '' && ! inputs.latest }} run: | docker build -f Dockerfile --build-arg FLUTTER_VERSION=${{inputs.version}} -t tauu/flutter-windows-builder:${{inputs.version}} . - - name: docker push latest - if: ${{ inputs.version == '' }} + - name: docker build version and latest tag + if: ${{ inputs.version != '' && inputs.latest }} run: | - docker push tauu/flutter-windows-builder:latest - - name: docker push version tag + docker build -f Dockerfile --build-arg FLUTTER_VERSION=${{inputs.version}} -t tauu/flutter-windows-builder:${{inputs.version}} tauu/flutter-windows-builder:latest . + - name: docker push all tag if: ${{ inputs.version != '' }} run: | - docker push tauu/flutter-windows-builder:${{inputs.version}} + docker push -a tauu/flutter-windows-builder