diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c4310eeee..e1971020e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -17,6 +17,32 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + build_backend: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: ./backend + push: true + tags: ghcr.io/datalab-mi/basegun/basegun-backend:${{ github.head_ref }} + + test: + needs: build + runs-on: ubuntu-latest + container: + image: ghcr.io/datalab-mi/basegun/basegun-backend:${{ github.head_ref }} + steps: + - run: python -m unittest + build-and-test: uses: ./.github/workflows/test-on-kube.yml needs: tag-pr diff --git a/secrets.yaml b/secrets.yaml new file mode 100644 index 000000000..ac43db16c --- /dev/null +++ b/secrets.yaml @@ -0,0 +1,12 @@ +apiVersion: isindir.github.com/v1alpha3 +kind: SopsSecret +metadata: + name: sops-secret +spec: + secretTemplates: + - name: basegun-preprod-secret + stringData: + API_OVH_TOKEN: 16va230de1m522bqprp5qhjbpd5d0enm34biht4mmlbsc74ds36j + X_OVH_TOKEN: c66a45f6-68fb-4a33-bff2-77392e465038 + AWS_ACCESS_KEY_ID: 17b1a48a696d4ec488f79f71a0e1580a + AWS_SECRET_ACCESS_KEY: ddff8523e4dd4530a74b560cf0cd406f \ No newline at end of file