From 7c0f0d7af83d1b147c71902d575a1cc2c6601748 Mon Sep 17 00:00:00 2001 From: KevFan Date: Wed, 18 Oct 2023 10:10:31 +0100 Subject: [PATCH] workflow: re-add smoke test --- .github/workflows/build-image.yaml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index 53ccdb02..514a13e8 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -36,11 +36,11 @@ jobs: images: | ${{ env.IMG_REGISTRY_HOST}}/${{ env.IMG_REGISTRY_ORG }}/limitador tags: | + type=sha # set latest tag for main branch type=raw,value=latest,enable=${{ github.ref_name == env.MAIN_BRANCH_NAME }} # set branch name tag for non-main branches type=raw,value=${{ github.ref_name }},enable=${{ github.ref_name != env.MAIN_BRANCH_NAME }} - type=sha - name: Login to container registry uses: docker/login-action@v2 with: @@ -57,20 +57,10 @@ jobs: GITHUB_SHA=${{ github.sha }} cache-from: type=gha cache-to: type=gha,mode=max -# - name: Build Image -# id: build-image -# uses: redhat-actions/buildah-build@v2 -# with: -# image: limitador -# tags: ${{ env.IMG_TAGS }} -# platforms: linux/amd64,linux/arm64 -# dockerfiles: | -# ./Dockerfile -# build-args: | -# GITHUB_SHA=${{ github.sha }} -# - name: Smoke Test -# run: | -# podman run --rm -t ${{ steps.build-image.outputs.image }}:${{ github.sha }} limitador-server --help + load: true + - name: Smoke Test + run: | + docker run --rm -t ${{ steps.meta.outputs.tags[0] }} limitador-server --help # - name: Push Image # if: ${{ !env.ACT }} # id: push-to-quay