Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: push docker images only on main, and test docker images for… #469

Merged
merged 13 commits into from
Oct 24, 2024
Merged
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🐳 Docker builds
name: 🐳 Docker builds and test
on:
workflow_call:
secrets:
Expand All @@ -13,7 +13,7 @@ concurrency:

jobs:
build-images:
name: Build images
name: Build images and test
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
Expand All @@ -28,14 +28,14 @@ jobs:
uses: redhat-actions/buildah-build@v2
with:
image: godot-explorer
tags: ${{ github.sha }}
tags: latest ${{ github.sha }}
dockerfiles: |
./Dockerfile
build-args: |
${{ inputs.build-args }}
COMMIT_HASH=${{ github.sha }}

- name: Push To quay.io
if: github.ref == 'refs/heads/main' # TODO: Push only on tags / releases?
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
Expand All @@ -45,5 +45,23 @@ jobs:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"
- name: Run avatar test
run: |
mkdir -p output
podman run --rm -v \
$(pwd)/tests/avatars-test-input.json:/app/avatars.json \
-v $(pwd)/output:/app/output localhost/godot-explorer:latest

- name: Compare images with snapshots
run: |
cargo run -- compare-image-folders \
--snapshots tests/snapshots/avatar-image-generation/ \
--result ${{ github.workspace }}/output/

- name: Upload artifacts
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: avatar-snapshots
path: |
${{ github.workspace }}/output/**/*
39 changes: 0 additions & 39 deletions .github/workflows/docker_tests.yml

This file was deleted.

5 changes: 2 additions & 3 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ jobs:
- name: Install dependencies
uses: ./.github/actions/install-deps

- name: Install
# Build section
- name: Cargo install
run: cargo run -- install


# Build section
- name: Build
working-directory: lib
run: cargo build --release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macos_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
- name: Install dependencies
uses: ./.github/actions/install-deps

- name: Install
# Build section
- name: Cargo install
run: cargo run -- install

# Build section
- name: Build
working-directory: lib
run: cargo build --release
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,11 @@ jobs:
needs: static-checks
uses: ./.github/workflows/windows_builds.yml

# Third stage: Extra ci
docker-build:
name: 🐳 Docker builds
# Third stage: Extras
docker-build-test:
name: 🐳 Docker builds and test
needs: linux-build
uses: ./.github/workflows/docker_builds.yml
# if: github.ref == 'refs/heads/main'
uses: ./.github/workflows/docker_build_test.yml
secrets:
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}

docker-tests:
name: 🧪 Docker tests
needs: docker-build
uses: ./.github/workflows/docker_tests.yml
5 changes: 2 additions & 3 deletions .github/workflows/windows_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ jobs:
- name: Install dependencies
uses: ./.github/actions/install-deps

- name: Install
# Build section
- name: Cargo install
run: cargo run -- install


# Build section
- name: Build
working-directory: lib
run: cargo build --release
Expand Down
2 changes: 1 addition & 1 deletion godot/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Godot 4+ specific ignores
/.godot/

android/
/android/

# Godot-specific ignores
.import/
Expand Down
5 changes: 0 additions & 5 deletions godot/.godot/extension_list.cfg

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Loading
Loading