Migrate to gitea-actions (#8)

Reviewed-on: #8
This commit is contained in:
Andrew Tomaka 2024-07-13 20:27:24 -04:00
parent 864374959e
commit 638ea4a9d6
4 changed files with 69 additions and 54 deletions

View file

@ -1,54 +0,0 @@
name: test
kind: pipeline
steps:
- name: linting
image: docker.atomaka.com/mdformat
commands:
- mdformat --check _posts/
- name: jekyll-build
image: ruby
commands:
- gem install bundler
- bundle install
- bundle exec jekyll build
trigger:
branch:
exclude: master
event: push
---
name: deploy
kind: pipeline
steps:
- name: jekyll-build
image: ruby
commands:
- gem install bundler
- bundle install
- bundle exec jekyll build
- name: docker-build
image: plugins/docker
settings:
pull_image: true
registry: docker.atomaka.com
repo: docker.atomaka.com/atomaka.com
tags:
- latest
- ${DRONE_TAG}
- name: deploy
image: appleboy/drone-ssh
settings:
host:
from_secret: unraid_host
username:
from_secret: unraid_username
key:
from_secret: unraid_ssh_key
script:
- bash /boot/local/bin/update-atomaka.sh
trigger:
event: tag

View file

@ -0,0 +1,37 @@
name: Deploy
on:
push:
tags:
- '*'
jobs:
deploy:
runs-on: cth-ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.2
- run: |
gem install bundler
bundle install
bundle exec jekyll build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- run: |
ls -la .
ls -la _site/
pwd
- name: Push image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
docker.atomaka.com/atomaka.com:latest
docker.atomaka.com/atomaka.com:${{gitea.ref_name}}
- name: Deploy to server
run: |
curl --oauth2-bearer ${{ secrets.WATCHTOWER_TOKEN }} \
${{ secrets.WATCHTOWER_HOST }}/v1/update?images=docker.atomaka.com/atomaka.com

View file

@ -0,0 +1,28 @@
name: Linting
on:
pull_request:
jobs:
lint:
runs-on: cth-ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: addnab/docker-run-action@v3
with:
image: docker.atomaka.com/mdformat:latest
options: --volumes-from=${{ env.JOB_CONTAINER_NAME }}
run: |
cd ${{ github.workspace }}
mdformat --check _posts/
build:
runs-on: cth-ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.2
- run: |
gem install bundler
bundle install
bundle exec jekyll build

View file

@ -36,6 +36,7 @@ GEM
faraday-net_http (3.0.2)
ffi (1.15.5)
forwardable-extended (2.6.0)
google-protobuf (3.21.12)
google-protobuf (3.21.12-x86_64-linux)
htmlbeautifier (1.4.2)
htmlcompressor (0.4.0)
@ -98,6 +99,8 @@ GEM
tomlrb
mixlib-shellout (3.2.7)
chef-utils
nokogiri (1.14.1-arm64-darwin)
racc (~> 1.4)
nokogiri (1.14.1-x86_64-linux)
racc (~> 1.4)
octokit (4.25.1)
@ -132,6 +135,7 @@ GEM
webrick (1.8.1)
PLATFORMS
arm64-darwin-23
x86_64-linux
DEPENDENCIES