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:
|
jobs:
|
||||||
package-and-push:
|
package-and-push:
|
||||||
needs: test
|
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
container: mcr.microsoft.com/devcontainers/python:3.11
|
||||||
|
|
||||||
steps:
|
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
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
@@ -18,13 +28,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
make clean
|
make clean
|
||||||
make all
|
make all
|
||||||
python package.py
|
python ./deploy/bundle.py
|
||||||
mkdir -p deploy/packages
|
|
||||||
mv chess-bundle.zip deploy/packages/
|
|
||||||
|
|
||||||
- name: Push package to registry
|
- name: Push package to registry
|
||||||
env:
|
env:
|
||||||
REGISTRY_URL: ${{ secrets.REGISTRY_URL }}
|
REGISTRY_URL: ${{ secrets.REGISTRY_URL }}
|
||||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
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
|
ignore_patterns=None
|
||||||
):
|
):
|
||||||
|
|
||||||
|
package_dir = "./deploy/package"
|
||||||
|
os.makedirs(package_dir, exist_ok=True)
|
||||||
|
|
||||||
timestamp = datetime.now().strftime("%Y%m%d%H%M")
|
timestamp = datetime.now().strftime("%Y%m%d%H%M")
|
||||||
filename = f"{timestamp}.{name}.zip"
|
filename = f"{timestamp}.{name}.zip"
|
||||||
self.outfile = os.path.join("./deploy/package", filename)
|
self.outfile = os.path.join("./deploy/package", filename)
|
||||||
|
|||||||
Reference in New Issue
Block a user