fix-broken-build-workflow (#36)
Reviewed-on: #36 Co-authored-by: Josh <josh@joshuaschuett.com> Co-committed-by: Josh <josh@joshuaschuett.com>
This commit is contained in:
@@ -7,10 +7,20 @@ on:
|
||||
|
||||
jobs:
|
||||
package-and-push:
|
||||
needs: test
|
||||
runs-on: ubuntu-22.04
|
||||
container: mcr.microsoft.com/devcontainers/python:3.11
|
||||
|
||||
steps:
|
||||
- name: Install Node (and git/make) inside container
|
||||
run: |
|
||||
set -eux
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends curl ca-certificates git build-essential make
|
||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||
apt-get install -y --no-install-recommends nodejs
|
||||
node -v
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
@@ -18,13 +28,11 @@ jobs:
|
||||
run: |
|
||||
make clean
|
||||
make all
|
||||
python package.py
|
||||
mkdir -p deploy/packages
|
||||
mv chess-bundle.zip deploy/packages/
|
||||
python ./deploy/bundle.py
|
||||
|
||||
- name: Push package to registry
|
||||
env:
|
||||
REGISTRY_URL: ${{ secrets.REGISTRY_URL }}
|
||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
run: ./deploy/push-to-registry.sh
|
||||
run: ./deploy/push-package.sh
|
||||
|
||||
@@ -12,6 +12,9 @@ class Packager:
|
||||
ignore_patterns=None
|
||||
):
|
||||
|
||||
package_dir = "./deploy/package"
|
||||
os.makedirs(package_dir, exist_ok=True)
|
||||
|
||||
timestamp = datetime.now().strftime("%Y%m%d%H%M")
|
||||
filename = f"{timestamp}.{name}.zip"
|
||||
self.outfile = os.path.join("./deploy/package", filename)
|
||||
|
||||
Reference in New Issue
Block a user