Skip to content

Commit

Permalink
add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
lacraig2 committed Jan 14, 2025
1 parent e05b2d6 commit 183c2e4
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/parallel_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Parallel Tests
# For PRs to dev or pushes that modify the root Dockerfile, build from scratch
# then run CI tests using that container in parallel
# For forked repos that can't use our panda-arc test suite, just build and run make check
on:
# Allow to repo owner to manually run this workflow for external PRs once code is vetted
workflow_dispatch:

# Run automatically for internal PRs and pushes
pull_request:
branches:
- main

jobs:
build_container:
if: github.repository == 'panda-re/qemu'
runs-on: ubuntu-latest
steps:
# - name: Install git
# run: sudo apt-get -qq update -y && sudo apt-get -qq install git -y
- uses: actions/checkout@v4 # Clones to $GITHUB_WORKSPACE. NOTE: this requires git > 2.18 (not on ubuntu 18.04 by default) to get .git directory
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/build-push-action@v5
with:
context: ${{ github.workspace }}
push: false
42 changes: 42 additions & 0 deletions .github/workflows/publish_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and Publish Docker Container and Pypanda Docs # Only for main panda-re repo, not forks

on:
push:
branches:
- main

jobs:
build_release_assets:
if: github.repository == 'panda-re/qemu' && github.ref == 'refs/heads/dev'
runs-on: panda-arc
steps:
- name: Install git
run: sudo apt-get -qq update -y && sudo apt-get -qq install git curl jq -y

- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get next version
uses: reecetech/[email protected]
id: version
with:
release_branch: dev
use_api: true

- name: 'Login to Docker Registry'
uses: docker/login-action@v3
with:
username: pandare
password: ${{secrets.pandare_dockerhub}}

- name: Build panda:latest
uses: docker/build-push-action@v5
with:
push: true
context: ${{ github.workspace }}
tags: |
pandare/panda-ng:${{ github.sha }}
pandare/panda-ng:${{ steps.version.outputs.v-version }}
pandare/panda-ng:latest

0 comments on commit 183c2e4

Please sign in to comment.