Skip to content

Commit

Permalink
fix GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
guidopetri committed Apr 18, 2024
1 parent ffcdfaf commit 79f096d
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ env:
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
build-e2e-test-and-push-image:
runs-on: ubuntu-latest
env:
LUIGI_ENV: ${{ secrets.E2E_TESTS_LUIGI_ENV }}
POSTGRES_ENV: ${{ secrets.E2E_TESTS_POSTGRES_ENV }}
permissions:
contents: read
packages: write
Expand All @@ -32,7 +35,17 @@ jobs:
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
- name: Build amd64 Docker image for testing
uses: docker/build-push-action@v5
with:
context: .
tags: ${{ env.IMAGE_NAME }}
- name: Run e2e test
run: |
echo $LUIGI_ENV > .luigi_env
echo $POSTGRES_ENV > .postgres_env
make e2e-test
- name: Build arm64 Docker image and push to GHCR
uses: docker/build-push-action@v5
with:
context: .
Expand All @@ -42,15 +55,3 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
e2e-tests:
runs-on: ubuntu-latest
needs: build-and-push-image
env:
LUIGI_ENV: ${{ secrets.E2E_TESTS_LUIGI_ENV }}
POSTGRES_ENV: ${{ secrets.E2E_TESTS_POSTGRES_ENV }}
steps:
- name: Run e2e test
run: |
echo $LUIGI_ENV > .luigi_env
echo $POSTGRES_ENV > .postgres_env
make e2e-test

0 comments on commit 79f096d

Please sign in to comment.