Skip to content

Commit

Permalink
workflow: re-add smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
KevFan committed Oct 18, 2023
1 parent b2d8f01 commit 15b13f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
24 changes: 7 additions & 17 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ jobs:
images: |
${{ env.IMG_REGISTRY_HOST}}/${{ env.IMG_REGISTRY_ORG }}/limitador
tags: |
type=raw,value=${{ github.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:
Expand All @@ -55,22 +55,12 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
build-args: |
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
cache-from: type=gha,scope=${{ matrix.platform == 'linux/amd64' && 'build-amd' || 'build-arm'}}
cache-to: type=gha,mode=max,scope=${{ matrix.platform == 'linux/amd64' && 'build-amd' || 'build-arm'}}
load: true
- name: Smoke Test
run: |
docker run --rm -t ${{ env.IMG_REGISTRY_HOST}}/${{ env.IMG_REGISTRY_ORG }}/limitador:${{ github.sha }} limitador-server --help
# - name: Push Image
# if: ${{ !env.ACT }}
# id: push-to-quay
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
with:
context: .
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=gha,scope=e2e
cache-to: type=gha,mode=max,scope=e2e
load: true
- name: Create k8s Kind Cluster
uses: helm/[email protected]
Expand Down

0 comments on commit 15b13f0

Please sign in to comment.