Merge branch 'main' of github.com:gmt2001/ouroboros #107
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Build | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Docker Test on ubuntu-latest | |
runs-on: ubuntu-latest | |
services: | |
registry: | |
image: registry:2 | |
ports: | |
- 5000:5000 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: amd64 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
version: latest | |
driver-opts: network=host | |
- name: Update Version String | |
run: | | |
sed -i -r 's/VERSION = "custom"/VERSION = "0.0+test"/' pyouroboros/__init__.py | |
echo $?\ | |
- name: Build Docker | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64 | |
push: true | |
cache-from: type=gha,scope=main | |
tags: localhost:5000/tester/ouroboros:test | |
- name: Build Docker (main) | |
if: github.ref_name == 'main' | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64 | |
push: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
tags: localhost:5000/tester/ouroboros:test | |
- name: Test with Docker | |
run: | | |
sudo mkdir -p /app/pyouroboros/hooks | |
docker run --rm --name ouroboros -v /var/run/docker.sock:/var/run/docker.sock localhost:5000/tester/ouroboros:test --run-once --dry-run --log-level debug |