Skip to content

Commit 50853d6

Browse files
author
Tristen Harr
committed
update workflow
1 parent d7219de commit 50853d6

File tree

4 files changed

+32
-15
lines changed

4 files changed

+32
-15
lines changed

.github/workflows/ndc-python-lambda-connector.yaml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,6 @@ jobs:
6969
if: startsWith(github.ref, 'refs/tags/v')
7070
steps:
7171
- uses: actions/checkout@v4
72-
- name: Download definition
73-
uses: actions/download-artifact@v4
74-
with:
75-
name: connector-definition
76-
path: ./connector-definition/dist
7772
- name: Login to GitHub Container Registry
7873
uses: docker/login-action@v3
7974
with:
@@ -85,19 +80,11 @@ jobs:
8580
uses: docker/metadata-action@v5
8681
with:
8782
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}
88-
- name: Debugging
89-
run: |
90-
echo "Contents of root directory:"
91-
ls -la
92-
ls -la ./connector-definition
93-
cat ./connector-definition/Dockerfile
94-
# echo "Contents of connector-definition/dist/.hasura-connector:"
95-
# ls -la connector-definition/dist/.hasura-connector
9683
- name: Build and push Docker image
9784
uses: docker/build-push-action@v5
9885
with:
99-
context: ./connector-definition/dist/.hasura-connector
100-
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
86+
context: .
87+
push: true
10188
tags: ${{ steps.docker-metadata.outputs.tags }}
10289
labels: ${{ steps.docker-metadata.outputs.labels }}
10390

Dockerfile

Whitespace-only changes.

docker/package-restore.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env sh
2+
set -eu -o pipefail
3+
4+
cd /functions
5+
6+
if [ ! -d "venv" ]
7+
then
8+
python3 -m venv venv
9+
. venv/bin/activate
10+
if [ -f "requirements.txt" ]
11+
then
12+
pip install -r requirements.txt
13+
fi
14+
else
15+
. venv/bin/activate
16+
fi

docker/start.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env sh
2+
set -eu -o pipefail
3+
4+
/scripts/package-restore.sh
5+
6+
cd /functions
7+
8+
# Activate virtual environment if it exists
9+
if [ -f "venv/bin/activate" ]; then
10+
source venv/bin/activate
11+
fi
12+
13+
# Run the Python script with the serve command
14+
python3 functions/functions.py serve --configuration ./

0 commit comments

Comments
 (0)