App-GHGen
view release on metacpan or search on metacpan
lib/App/GHGen/Generator.pm view on Meta::CPAN
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version:
- '3.1'
- '3.2'
- '3.3'
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run tests
run: bundle exec rake test
YAML
}
sub _generate_docker_workflow() {
return <<'YAML';
---
name: Docker Build
'on':
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: github.event_name != 'pull_request'
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: your-username/your-image
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
YAML
}
sub _generate_static_workflow() {
return <<'YAML';
---
name: Deploy Static Site
'on':
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build
run: echo "Add your build command here"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public
deploy:
environment:
name: github-pages
( run in 0.860 second using v1.01-cache-2.11-cpan-bbe5e583499 )