-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release/feature/241005-workflow (#43)
* chore: Setup-go@v5 * feat: Run lint and open PR auto * feat: Add status badge into the header * fix: Rename markdownlint to lint * fix: Syntax error * feat: create-pull-request -> gh pr create * feat: temporarily disable lint * feat: Add status badge for page-build-deployment * fix: GH_TOKEN for release workflow * fix: Attach body for gh pr --------- Co-authored-by: Atsuya Watanabe <[email protected]>
- Loading branch information
1 parent
d6de8ae
commit 50870f1
Showing
5 changed files
with
172 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
|
||
extends: default | ||
|
||
rules: | ||
line-length: | ||
level: warning | ||
document-start: disable | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Lint | ||
|
||
"on": | ||
push: | ||
branches: ["Notting"] | ||
# branches-ignore: | ||
# - main | ||
# tags: | ||
# - "*" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
markdownlint: | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run markdownlint-cli2-action@v17 | ||
uses: DavidAnson/markdownlint-cli2-action@v17 | ||
with: | ||
fix: true | ||
globs: '**/*.md' | ||
continue-on-error: true | ||
- name: Run create-pull-request | ||
uses: peter-evans/create-pull-request@v7 | ||
with: | ||
author: >- | ||
github-actions[bot] | ||
<41898282+github-actions[bot]@users.noreply.github.com> | ||
commit-message: "fix: Lint suggestions" | ||
branch: "patch/${{ github.ref_name }}" | ||
title: "fix: Lint suggestions for ${{ github.ref_name }}" | ||
yamllint: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run yamllint-github-action | ||
uses: karancode/[email protected] | ||
with: | ||
yamllint_file_or_dir: .github/workflows/ | ||
yamllint_config_filepath: .github/.yamllint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Release | ||
|
||
"on": | ||
push: | ||
branches-ignore: | ||
- main | ||
tags: | ||
- "*" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
openPR: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create PR | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
gh pr create \ | ||
--base "main" \ | ||
--head "${{ github.ref_name }}" \ | ||
--title "Release/${{ github.ref_name }}" \ | ||
--body "GitHub actions" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{{ if and .Site.Params.permanentTopNav .Site.Params.stickyNav }} | ||
<header class="sticky"> | ||
{{ else }} | ||
<header> | ||
{{ end }} | ||
<a id="back-to-top-button"> | ||
<i class="fas fa-angle-up"></i> | ||
</a> | ||
|
||
<div class="container"> | ||
<div class="logo"> | ||
<a href="{{ .Site.BaseURL | relLangURL }}" class="logo"> | ||
{{ if and (isset .Site.Params "customimage") (ne .Site.Params.customImage "") }} | ||
<img src="{{ .Site.Params.customImage | relURL }}" alt=""> | ||
{{ else }} | ||
{{ $avatarEmail := "" }} | ||
{{ if not (eq .Site.Params.avatarEmail nil) }} | ||
{{ $avatarEmail = .Site.Params.avatarEmail }} | ||
{{ else }} | ||
{{ $avatarEmail = .Site.Params.gravatarEMail }} | ||
{{ end }} | ||
<img src="https://seccdn.libravatar.org/avatar/{{ md5 $avatarEmail }}?d=mm&size=200" alt=""> | ||
{{ end }} | ||
|
||
<span class="overlay"><i class="fa {{ .Site.Params.overlayIcon | default "fa-home" }}"></i></span> | ||
</a> | ||
</div> | ||
<div class="titles"> | ||
<h3 class="title"> | ||
<a href="{{ .Site.BaseURL | relLangURL }}"> | ||
{{ .Site.Title | default "My cool new blog" }} | ||
</a> | ||
</h3> | ||
|
||
{{ with .Site.Params.Subtitle }} | ||
<span class="subtitle">{{ . }}</span> | ||
{{ end }} | ||
<p style="margin-top: .5rem"> | ||
<a href="https://github.com/atsuyaw/atsuyaw.github.io/actions/workflows/gh-pages.yml"> | ||
<img src="https://github.com/atsuyaw/atsuyaw.github.io/actions/workflows/gh-pages.yml/badge.svg" alt="Status on Deployment of GitHub Pages"> | ||
</a> | ||
<a href="https://github.com/atsuyaw/atsuyaw.github.io/actions/workflows/pages/pages-build-deployment"> | ||
<img src="https://github.com/atsuyaw/atsuyaw.github.io/actions/workflows/pages/pages-build-deployment/badge.svg" alt="pages-build-deployment"> | ||
</a> | ||
</p> | ||
</div> | ||
<div class="selectors"> | ||
{{ if .Site.Params.enableLightDarkTheme | default false }} | ||
<div class="light-dark-mode"> | ||
<button id="light-dark-toggle" class="fa-solid fa-sun"></button> | ||
</div> | ||
{{ end }} | ||
{{ if and (gt .Site.Languages 1) (.Site.Params.showHeaderLanguageChooser | default true) }} | ||
{{- $language := .Language -}} | ||
{{- $pages := .Page.AllTranslations -}} | ||
<div class="languages"> | ||
{{ range $.Site.Home.AllTranslations }} | ||
{{ $url := .RelPermalink }} | ||
{{ range where $pages "Lang" .Language.Lang }} | ||
{{ $url = .RelPermalink }} | ||
{{ end }} | ||
|
||
{{ if eq $language .Language }} | ||
<a href="{{ $url }}" class="active">{{ .Language }}</a> | ||
{{ else }} | ||
<a href="{{ $url }}">{{ .Language }}</a> | ||
{{ end }} | ||
{{ end }} | ||
</div> | ||
{{ end }} | ||
</div> | ||
|
||
{{ if .Site.Params.permanentTopNav }} | ||
<div class="toggler permanentTopNav"> | ||
{{ else }} | ||
<div class="toggler"> | ||
{{ end }} | ||
<i class="fa fa-bars" aria-hidden="true"></i> | ||
</div> | ||
</div> | ||
</div> | ||
</header> |