toy/.gitea/workflows/demo.yaml
Ryan Cavicchioni 3b5e0f5c71
All checks were successful
Gitea Actions Demo / lint (push) Successful in 1m22s
Gitea Actions Demo / test (push) Successful in 1m19s
Gitea Actions Demo / release-image (push) Successful in 1m1s
standardrb: don't autofix
2024-07-07 16:43:30 -05:00

73 lines
1.5 KiB
YAML

---
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
permissions:
checks: write
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Ruby Setup
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- run: bundle install
- name: Standard Ruby
run: bundle exec standardrb
test:
needs: lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- run: ruby app_test.rb
release-image:
needs: test
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
env:
DOCKER_ORG: ryanc
DOCKER_LATEST: latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # all history for all branches and tags
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Gitea registry
uses: docker/login-action@v3
with:
registry: git.kill0.net
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker build and push
uses: docker/build-push-action@v5
with:
push: true
tags: git.kill0.net/ryanc/toy:latest