Deploy achievement-safe Factorio 2.0.77 with strict placement, monitoring and limited CD
This commit is contained in:
commit
d1978abb05
29 files changed
+1459
No files matched your search
@@ -0,0 +1,53 @@
|
||||
name: Test and deploy Factorio
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
concurrency:
|
||||
group: factorio-${{ gitea.ref }}
|
||||
cancel-in-progress: false
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install tools
|
||||
run: |
|
||||
python3 -m pip install --user 'PyYAML==6.0.3'
|
||||
curl -fsSL https://dl.k8s.io/release/v1.35.3/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl
|
||||
chmod 0755 /usr/local/bin/kubectl
|
||||
- name: Test policy and boot the actual game configuration
|
||||
env:
|
||||
FACTORIO_SMOKE_TEST: 'true'
|
||||
run: ./test.sh
|
||||
- name: Validate Kubernetes schemas
|
||||
run: |
|
||||
./render.sh | docker run --rm -i ghcr.io/yannh/kubeconform:v0.7.0 -strict -ignore-missing-schemas -summary
|
||||
for file in namespace.yaml placement-rbac.yaml ci-deployer.yaml; do
|
||||
printf '%s\n' '---'
|
||||
cat "$file"
|
||||
done | docker run --rm -i ghcr.io/yannh/kubeconform:v0.7.0 -strict -summary
|
||||
deploy:
|
||||
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/main'
|
||||
needs: [validate]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 35
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install tools
|
||||
run: |
|
||||
python3 -m pip install --user 'PyYAML==6.0.3'
|
||||
curl -fsSL https://dl.k8s.io/release/v1.35.3/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl
|
||||
chmod 0755 /usr/local/bin/kubectl
|
||||
- name: Deploy using the dedicated Factorio service account
|
||||
env:
|
||||
KUBE_CONFIG_BASE64: ${{ secrets.KUBE_CONFIG_BASE64 }}
|
||||
FACTORIO_CI: 'true'
|
||||
run: |
|
||||
set -eu
|
||||
export KUBECONFIG="${RUNNER_TEMP}/factorio-kubeconfig"
|
||||
trap 'rm -f "$KUBECONFIG"' EXIT
|
||||
umask 077
|
||||
printf '%s' "$KUBE_CONFIG_BASE64" | base64 -d > "$KUBECONFIG"
|
||||
kubectl config set-cluster cluster --server=https://host.containers.internal:6443 --tls-server-name=192.168.0.2
|
||||
./install.sh
|
||||
Reference in new issue
Block a user