Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 35 additions & 10 deletions .github/workflows/social-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,25 @@ jobs:
run: |
python -m unittest discover -s ./firewheel/model-components/social-agent/docker/tests -p "test_*.py" -v

docker-validate:
needs: test
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build social-agent Docker image for amd64
uses: docker/build-push-action@v6
with:
context: ./firewheel/model-components/social-agent/docker
push: false
load: false
platforms: linux/amd64

publish:
needs: test
runs-on: ubuntu-latest
Expand All @@ -42,14 +61,20 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@v4
- name: Build and push versioned Docker image
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Read social-agent version
id: version
run: |
version=$( cat ./firewheel/model-components/social-agent/version.txt )
docker build ./firewheel/model-components/social-agent/docker --tag ghcr.io/${{ github.repository }}/social-agent:$version
docker push ghcr.io/${{ github.repository }}/social-agent:$version
- name: Retag and push latest Docker image
run: |
version=$( cat ./firewheel/model-components/social-agent/version.txt )
docker tag ghcr.io/${{ github.repository }}/social-agent:$version \
ghcr.io/${{ github.repository }}/social-agent:latest
docker push ghcr.io/${{ github.repository }}/social-agent:latest
echo "value=$(cat ./firewheel/model-components/social-agent/version.txt)" >> "$GITHUB_OUTPUT"
- name: Build and push multi-arch Docker image
uses: docker/build-push-action@v6
with:
context: ./firewheel/model-components/social-agent/docker
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/${{ github.repository }}/social-agent:${{ steps.version.outputs.value }}
ghcr.io/${{ github.repository }}/social-agent:latest
3 changes: 2 additions & 1 deletion firewheel/model-components/social-agent/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.synchronic_web.social_agent.installed
env/
env/
docker/custom-setup.sh
9 changes: 9 additions & 0 deletions firewheel/model-components/social-agent/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
FROM python:3.11.9-alpine3.19

WORKDIR /srv
ARG CUSTOM_SETUP=""

RUN set -eu; \
if [ -n "$CUSTOM_SETUP" ]; then \
echo "$CUSTOM_SETUP" | base64 -d > /tmp/custom-setup.sh; \
chmod +x /tmp/custom-setup.sh; \
/bin/sh -eu /tmp/custom-setup.sh; \
rm -f /tmp/custom-setup.sh; \
fi

COPY ./requirements.txt ./requirements.txt

Expand Down
2 changes: 1 addition & 1 deletion firewheel/model-components/social-agent/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.2
1.0.3
Loading