feat: test CI
Some checks failed
ci / Lint GSC files (push) Successful in 10s
ci / Deploy artifacts (push) Failing after 20s

This commit is contained in:
6arelyFuture 2025-05-22 11:01:24 +02:00
parent c83a9abfb0
commit a0f4717e07
Signed by: Future
GPG Key ID: F2000F181A4F7C85
2 changed files with 70 additions and 22 deletions

70
.gitea/workflows/ci.yml Normal file
View File

@ -0,0 +1,70 @@
name: ci
on: [push]
jobs:
lint:
name: Lint GSC files
runs-on: ubuntu-latest
steps:
- name: Check out files
uses: actions/checkout@v4
- name: Lint
uses: addnab/docker-run-action@v3
with:
registry: gcr.io
image: xensik/gsc-tool:latest
options: --volumes-from=${{ env.JOB_CONTAINER_NAME }}
run: |
cd ${{ github.workspace }}
gsc-tool --dry -m parse -g iw5 -s pc "raw/scripts"
gsc-tool --dry -m comp -g iw5 -s pc "raw/maps"
- name: Upload raw artifacts
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v3
with:
name: raw artifacts
path: |
raw/*
deploy:
name: Deploy artifacts
needs: [lint]
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: Install dependencies
run: |
apt-get update
apt-get install -y rsync
- name: Setup main environment
run: echo "ALTERWARE_MASTER_SERVER_PATH=${{ secrets.ALTERWARE_MASTER_SSH_PATH }}" >> $GITHUB_ENV
- name: Download raw artifacts
uses: actions/download-artifact@v3
with:
name: raw artifacts
- name: List files after artifact download
run: ls -R
- name: Install SSH key
uses: shimataro/ssh-key-action@v2.7.0
with:
key: ${{ secrets.ALTERWARE_MASTER_SSH_PRIVATE_KEY }}
known_hosts: 'just-a-placeholder-so-we-dont-get-errors'
- name: Add known hosts
run: ssh-keyscan -H ${{ secrets.ALTERWARE_MASTER_SSH_ADDRESS }} >> ~/.ssh/known_hosts
- name: Remove old raw files
run: ssh ${{ secrets.ALTERWARE_MASTER_SSH_USER }}@${{ secrets.ALTERWARE_MASTER_SSH_ADDRESS }} rm -rf ${{ env.ALTERWARE_MASTER_SERVER_PATH }}/iw5/raw/*
- name: Upload raw files
run: rsync -avz ./raw/ ${{ secrets.ALTERWARE_MASTER_SSH_USER }}@${{ secrets.ALTERWARE_MASTER_SSH_ADDRESS }}:${{ env.ALTERWARE_MASTER_SERVER_PATH }}/iw5/raw/
- name: Publish changes
run: ssh ${{ secrets.ALTERWARE_MASTER_SSH_USER }}@${{ secrets.ALTERWARE_MASTER_SSH_ADDRESS }} ${{ secrets.ALTERWARE_SSH_CHANGE_PUBLISH_COMMAND }}

View File

@ -1,22 +0,0 @@
name: lint
on: [push]
jobs:
lint:
name: Lint GSC files
runs-on: ubuntu-latest
steps:
- name: Check out files
uses: actions/checkout@v4
- name: Lint
uses: addnab/docker-run-action@v3
with:
registry: gcr.io
image: xensik/gsc-tool:latest
options: --volumes-from=${{ env.JOB_CONTAINER_NAME }}
run: |
cd ${{ github.workspace }}
gsc-tool --dry -m parse -g iw5 -s pc "raw/scripts"
gsc-tool --dry -m comp -g iw5 -s pc "raw/maps"