Skip to content
Closed
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
3 changes: 2 additions & 1 deletion .github/ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM swipl:latest
FROM swipl:9.3.35

# Install system build tools for your Python/native deps
RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential python3-dev git \
&& rm -rf /var/lib/apt/lists/*

24 changes: 8 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ jobs:
build-image:
needs: changes
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
outputs:
pushed: ${{ steps.push-flag.outputs.push }}
image: ${{ steps.compute.outputs.image }}
Expand All @@ -54,16 +51,15 @@ jobs:
- name: Compute image ref
id: compute
run: |
echo "image=ghcr.io/patham9/petta-ci" >> $GITHUB_OUTPUT
echo "image=trueagi/petta" >> $GITHUB_OUTPUT
echo "tag=pr-${{ github.event.number || github.run_id }}" >> $GITHUB_OUTPUT

- name: Login to GHCR
- name: Login to Docker Hub
if: steps.should-build.outputs.build == 'true'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
username: romantreutlein
password: ${{ secrets.DOCKERHUBTOKEN }}

- name: Setup Buildx
if: steps.should-build.outputs.build == 'true'
Expand Down Expand Up @@ -106,7 +102,7 @@ jobs:
- name: Resolve image
id: resolve
run: |
DEFAULT="ghcr.io/patham9/petta-ci:latest"
DEFAULT="trueagi/petta:latest"
if [ "${{ needs.build-image.outputs.pushed }}" = "true" ]; then
echo "image=${{ needs.build-image.outputs.image }}:${{ needs.build-image.outputs.tag }}" >> $GITHUB_OUTPUT
else
Expand Down Expand Up @@ -148,22 +144,18 @@ jobs:
publish-latest:
if: github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
username: romantreutlein
password: ${{ secrets.DOCKERHUBTOKEN }}
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v6
with:
context: .
file: .github/ci/Dockerfile
tags: ghcr.io/patham9/petta-ci:latest
tags: trueagi/petta:latest
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
1 change: 1 addition & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ for pid in $pids; do
done

rm -f "$pidfile"

exit $status