1
Fork 0

Add some CI

This commit is contained in:
Jake Howard 2024-03-03 19:37:32 +00:00
parent 0d0f51f101
commit 9e11b4ffdb
Signed by: jake
GPG Key ID: 57AFB45680EDD477
2 changed files with 55 additions and 0 deletions

24
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: CI
on: [push, pull_request]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build image
run: docker-compose build
- name: Show image info
run: docker images
- name: Test config
run: docker-compose run slides nginx -t
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install shellcheck
run: sudo apt-get update && sudo apt-get install -y shellcheck
- name: shellcheck
run: shellcheck docker-entrypoint.sh

31
.github/workflows/deploy.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Deploy
on:
push:
branches:
- 'master'
schedule:
- cron: '0 0 1 * *' # Keep it up-to-date automatically
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push containers
uses: docker/build-push-action@v4
with:
push: true
tags: |
ghcr.io/realorangeone/slides:latest