set backgroud to opaque on default to stay consistent #43
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: build kicad-render image | |
on: | |
push: | |
paths: | |
- Dockerfile | |
- '*.sh' | |
- .github/workflows/image.yaml | |
jobs: | |
test: | |
name: Test render-pcb.sh | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/linalinn/kicad:nightly | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: simple render | |
run: PATH="${GITHUB_WORKSPACE}:$PATH" bash render-pcb.sh -f "${GITHUB_WORKSPACE}/.github/tests/test pcb/test.kicad_pcb" && test -s "${GITHUB_WORKSPACE}/.github/tests/test pcb/test_top.png" | |
- name: simple render with output path | |
run: PATH="${GITHUB_WORKSPACE}:$PATH" bash render-pcb.sh -f "${GITHUB_WORKSPACE}/.github/tests/test pcb/test.kicad_pcb" -o "${GITHUB_WORKSPACE}/images" && test -s "${GITHUB_WORKSPACE}/images/top.png" | |
- name: simple render with filename prefix | |
run: PATH="${GITHUB_WORKSPACE}:$PATH" bash render-pcb.sh -f "${GITHUB_WORKSPACE}/.github/tests/test pcb/test.kicad_pcb" -p fp && test -s "${GITHUB_WORKSPACE}/.github/tests/test pcb/fp_top.png" | |
- name: simple render with output path and filename prefix | |
run: PATH="${GITHUB_WORKSPACE}:$PATH" bash render-pcb.sh -f "${GITHUB_WORKSPACE}/.github/tests/test pcb/test.kicad_pcb" -o "${GITHUB_WORKSPACE}/images" -p fp && test -s "${GITHUB_WORKSPACE}/images/fp_top.png" | |
- name: simple render with zoom | |
run: PATH="${GITHUB_WORKSPACE}:$PATH" bash render-pcb.sh -f "${GITHUB_WORKSPACE}/.github/tests/test pcb/test.kicad_pcb" -o "${GITHUB_WORKSPACE}/images" -z "0.5" && test -s "${GITHUB_WORKSPACE}/images/top.png" | |
- name: render with animation | |
run: PATH="${GITHUB_WORKSPACE}:$PATH" bash render-pcb.sh -f "${GITHUB_WORKSPACE}/.github/tests/test pcb/test.kicad_pcb" -o "${GITHUB_WORKSPACE}/images" -a "gif" && test -s "${GITHUB_WORKSPACE}/images/rotating.gif" | |
push_to_registry: | |
name: Push Docker image to Docker Hub | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get current date | |
id: date | |
run: echo "date=$(date +'%Y-%m-%d-%H-%M')" >> $GITHUB_OUTPUT | |
- name: Build and push Docker image dev | |
if: github.ref_name != github.event.repository.default_branch | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
build-args: | | |
"VERSION=${{ github.sha }}-dev" | |
tags: "ghcr.io/linalinn/kicad-render:${{ github.ref_name }}" | |
- name: Build and push Docker image | |
if: github.ref_name == github.event.repository.default_branch | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
build-args: | | |
"VERSION=${{ github.sha }}" | |
tags: ghcr.io/linalinn/kicad-render:nightly,ghcr.io/linalinn/kicad-render:nightly-${{ steps.date.outputs.date }} |