Skip to content

Release

Release #21

Workflow file for this run

on:
workflow_dispatch:
schedule:
- cron: '32 4 1-31/3 * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get docker-slim
run: |
SLIM_VERSION=1.40.10
curl -L -o ds.tar.gz https://downloads.dockerslim.com/releases/$SLIM_VERSION/dist_linux.tar.gz
tar -xvzf ds.tar.gz
mv dist_linux/* $GITHUB_WORKSPACE/
rm -rfv ds.tar.gz dist_linux/
- name: Setup
run: |
npm i
- name: Build
env:
BUILD_ENV: production
run: |
npm run build
npx astro build
# - name: Publish Site
# uses: cloudflare/[email protected]
# with:
# accountId: ${{ secrets.CF_ACCOUNT_ID }}
# apiToken: ${{ secrets.CF_API_TOKEN }}
# command: pages deploy --project-name=gmodwiki ./dist
- name: Build starter image
run: |
docker build --tag gmodwiki_fat:latest .
- name: Make slim image
run: |
EXIT_CODE=0
$GITHUB_WORKSPACE/docker-slim build \
--target gmodwiki_fat:latest \
--include-path /app/dist \
--include-path /app/node_modules \
--http-probe-off \
--remove-file-artifacts \
--continue-after 10 \
--show-clogs --show-blogs \
--tag ghcr.io/cfc-servers/gmodwiki:latest \
|| EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ] && [ $EXIT_CODE -ne 32 ] && [ $EXIT_CODE -ne 3 ]; then
exit $EXIT_CODE;
fi
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.GH_TOKEN }}
- name: Tag and push image
run: |
docker push ghcr.io/cfc-servers/gmodwiki --all-tags