ota-flasher/.github/workflows/build_artifacts.yaml

47 lines
1.2 KiB
YAML
Raw Normal View History

name: Build artifacts
on:
workflow_dispatch:
inputs:
directory:
description: 'Directory to run Docker command in'
required: true
default: '.'
jobs:
build-windows:
runs-on:
- ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
2024-06-09 12:50:38 +00:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
2024-06-09 13:07:00 +00:00
- name: Cache pip packages
id: pip-cache
uses: actions/cache@v4
with:
2024-06-09 13:15:52 +00:00
path: /tmp/cachepip
2024-06-09 13:07:00 +00:00
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
2024-06-09 12:50:38 +00:00
- name: Run Docker Container
run: |
2024-06-09 12:50:38 +00:00
docker run --rm \
2024-06-09 13:15:52 +00:00
--volume "/tmp/cachepip:/wine/drive_c/users/root/appdata/local/pip/cache/" \
2024-06-09 12:53:23 +00:00
--volume "${{ github.workspace }}:/src/" \
2024-06-09 12:50:38 +00:00
batonogov/pyinstaller-windows:latest
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: windows-artifacts
path: dist/