Skip to content

Commit

Permalink
[setup](build): base workflows (#53)
Browse files Browse the repository at this point in the history
* [setup](build): base workflows

* [setup](sec): codeql.yml

* [setup](build): codeql.yml

* [setup](web): Ruby Gemfile

* [cleanup](build):  jekyll_ai_related_posts-0.1.4.gem
  • Loading branch information
RalphHightower authored Dec 31, 2024
1 parent f99ff5b commit 58d1cc6
Show file tree
Hide file tree
Showing 10 changed files with 135 additions and 13 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/GitHubActionPermissions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
layout: post
tags: []
categories: []
#date: 2019-06-25 13:14:15
#excerpt: ''
#image: 'BASEURL/assets/blog/img/.png'
#description:
#permalink:
title: 'title'
---


permissions:
actions: read|write|none
checks: read|write|none
contents: read|write|none
deployments: read|write|none
issues: read|write|none
packages: read|write|none
pull-requests: read|write|none
repository-projects: read|write|none
security-events: read|write|none
statuses: read|write|noner
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
jekyll: ["~> 3.9", "~> 4.2"]
jekyll: ["~> 4.3.4"]
env:
JEKYLL_VERSION: ${{ matrix.jekyll }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4.2.2
- name: Set Up Ruby 3.3.6
uses: ruby/setup-ruby@v1.202.0
uses: ruby/setup-ruby@v1.206.0
with:
ruby-version: 3.3.6
bundler-cache: true
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: ["ruby"]
language: ["ruby","C#"]
# CodeQL supports [ $supported-codeql-languages ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

Expand All @@ -45,7 +45,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/autobuild@v2.19.3
uses: github/codeql-action/autobuild@v2.20.0
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -55,7 +55,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3.27.4
uses: github/codeql-action/autobuild@v2.20.0

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -68,6 +68,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2.19.3
uses: github/codeql-action/analyze@v2.20.0
with:
category: "/language:${{matrix.language}}"
66 changes: 66 additions & 0 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: jekyll.yml – Deploy Jekyll site to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main", "_staging", "next"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
- name: Setup Ruby
uses: ruby/setup-ruby@v1.206.0
with:
ruby-version: '3.3.6' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 1 # Increment this number if you need to re-download cached gems
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5.0.0
- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: bundle exec jekyll build --trace --incremental --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
JEKYLL_GITHUB_TOKEN: ${{secrets.JEKYLL_METADATA_TOKEN}}
LOG_LEVEL: debug
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v3.0.1

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4.0.5
2 changes: 1 addition & 1 deletion .github/workflows/permission_advisor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
advisor:
runs-on: ubuntu-latest
steps:
- uses: GitHubSecurityLab/actions-permissions/advisor@v1.0.2-beta4
- uses: GitHubSecurityLab/actions-permissions/advisor@v1.0.2-beta5
with:
name: ${{ inputs.name }}
count: ${{ inputs.count }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: release.yml – Release
on:
push:
branches:
- master
- main
- next
- beta
- "*.x"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: scorecard.yml — OpenSSF Scorecard
- cron: 31 2 * * 1
push:
branches:
- master
- main
permissions: read-all
jobs:
analysis:
Expand All @@ -31,6 +31,6 @@ jobs:
path: results.sarif
retention-days: 5
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@v2.19.3
uses: github/codeql-action/upload-sarif@v2.20.0
with:
sarif_file: results.sarif
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: test.yml — Test
on:
push:
branches:
- master
- main
# renovate/** branches are generated by https://github.com/apps/renovate
- renovate/**

Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/workflows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
layout: page
title: GitHub Workflows
#permalink: /Astronomy/
---

## Revision Date: 2024-12-27 2:31 PM

| action | date | github |
|---|---|---|
| DavidAnson/markdownlint-cli2-action@v18.0.0 | Nov 14, 2024 |[DavidAnson/markdownlint-cli2-action: A GitHub Action to run the markdownlint-cli2 tool for linting Markdown/CommonMark files with the markdownlint library](https://github.com/DavidAnson/markdownlint-cli2-action) |
| GitHubSecurityLab/actions-permissions/advisor@v1.0.2-beta5 | Dec 19, 2024 | [GitHubSecurityLab/actions-permissions: GitHub token permissions Monitor and Advisor actions](https://github.com/GitHubSecurityLab/actions-permissions) |
| actions/checkout@v4.2.2 | Oct 23, 2024 | [actions/checkout: Action for checking out a repo](https://github.com/actions/checkout) |
| actions/configure-pages@v5.0.0 | Mar 29, 2024 | [actions/configure-pages: An action to enable Pages and extract various metadata about a site. It can also be used to configure various static site generators we support as starter workflows.](https://github.com/actions/configure-pages) |
| actions/dependency-review-action@v4.5.0 | Nov 20, 2024 | [actions/dependency-review-action: A GitHub Action for detecting vulnerable dependencies and invalid licenses in your PRs](https://github.com/actions/dependency-review-action) |
| actions/deploy-pages@4.0.5 | Mar 18, 2024 | [actions/deploy-pages: GitHub Action to publish artifacts to GitHub Pages for deployments](https://github.com/actions/deploy-pages) |
| actions/jekyll-build-pages@v1.0.13 | Aug 6, 2024 | [actions/jekyll-build-pages: A simple GitHub Action for producing Jekyll build artifacts compatible with GitHub Pages.](https://github.com/actions/jekyll-build-pages) |
| actions/setup-node@v4.1.0 | Oct 24, 2024 | [actions/setup-node: Set up your GitHub Actions workflow with a specific version of node.js](https://github.com/actions/setup-node) |
| actions/upload-artifact@v4.5.0 | Dec 19, 2024 | [actions/upload-artifact](https://github.com/actions/upload-artifact) |
| actions/upload-pages-artifact@v3.0.1 | Feb 7, 2024 | [actions/upload-pages-artifact: A composite action for packaging and uploading an artifact that can be deployed to GitHub Pages.](https://github.com/actions/upload-pages-artifact) |
| amannn/action-semantic-pull-request@v5.5.3 | Jun 28, 2024 | [amannn/action-semantic-pull-request: A GitHub Action that ensures that your PR title matches the Conventional Commits spec](https://github.com/amannn/action-semantic-pull-request) |
| github/codeql-action/analyze@v2.20.0 | Dec 12, 2024 | [github/codeql-action: Actions for running CodeQL analysis](https://github.com/github/codeql-action) |
| github/codeql-action/autobuild@v2.20.0 | Dec 12, 2024 | [github/codeql-action: Actions for running CodeQL analysis](https://github.com/github/codeql-action) |
| github/codeql-action/init@v2.20.0 | Dec 12, 2024 | [github/codeql-action: Actions for running CodeQL analysis](https://github.com/github/codeql-action) |
| github/codeql-action/upload-sarif@v2.20.0 | Dec 12, 2024 | [github/codeql-action: Actions for running CodeQL analysis](https://github.com/github/codeql-action) |
| googleapis/release-please-action@4.1.3 | Jun 10, 2024 | [googleapis/release-please-action: automated releases based on conventional commits](https://github.com/googleapis/release-please-action)
| googleapis/release-please@v16.15.0 | Dec 2, 2024 | [googleapis/release-please: generate release PRs based on the conventionalcommits.org spec](https://github.com/googleapis/release-please) |
| lowlighter/metrics@3.34 | Sep 12, 2023 | [lowlighter/metrics: 📊 An infographics generator with 30+ plugins and 300+ options to display stats about your GitHub account and render them as SVG, Markdown, PDF or JSON!](https://github.com/lowlighter/metrics) |
| ossf/scorecard-action@v2.4.0 | Jul 26, 2024 | [ossf/scorecard-action: Official GitHub Action for OpenSSF Scorecard.](https://github.com/ossf/scorecard-action) |
| ruby/setup-ruby@v1.206.0 | Dec 26, 2024 | [ruby/setup-ruby: An action to download a prebuilt Ruby and add it to the PATH in 5 seconds](https://github.com/ruby/setup-ruby) |
| step-security/harden-runner@v2.10.2 | Nov 18, 2024 | [step-security/harden-runner: Network egress filtering and runtime security for GitHub-hosted and self-hosted runners](https://github.com/step-security/harden-runner) |
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ gem 'jekyll-github-metadata', '~> 2.16', '>= 2.16.1'
gem 'jekyll-last-modified-at', '~> 1.3', '>= 1.3.2'
gem 'jekyll-mentions', '~> 1.6'
gem 'jekyll-optional-front-matter', '~> 0.3.2'
gem 'jekyll-paginate', '~> 1.1'
gem 'jekyll-readme-index', '~> 0.3.0'
gem 'jekyll-relative-links', '~> 0.7.0'
gem 'jekyll-seo-tag', '~> 2.8'
Expand All @@ -45,4 +46,4 @@ gem 'base64', '~> 0.2.0'
# { 2024-10-29 @RalphHightower
gem 'nuggets', '~> 1.6', '>= 1.6.1'
# } 2024-10-29 @RalphHightower
end
end

0 comments on commit 58d1cc6

Please sign in to comment.