Skip to content

Add kicad-nightly image for faster kicad-render builds #26

Add kicad-nightly image for faster kicad-render builds

Add kicad-nightly image for faster kicad-render builds #26

Workflow file for this run

name: build docker image
on:
push:
jobs:
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 == 'dev'
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
build-args: |
"VERSION=${{ github.sha }}-dev"
tags: "ghcr.io/linalinn/kicad-render:dev,ghcr.io/linalinn/kicad-render:dev-${{ steps.date.outputs.date }}"
- 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 }}