Skip to content

Commit

Permalink
ci: disable dep check for push/pr, make daily reusable
Browse files Browse the repository at this point in the history
  • Loading branch information
7sDream committed Nov 12, 2023
1 parent e50b91a commit 8597844
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 60 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: build
name: Build

on:
workflow_call:
inputs:
name:
required: true
type: string

jobs:
build:
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- master

jobs:
lint_and_format_check:
style:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ name: Daily check
on:
schedule:
- cron: '0 23 * * *' # CST 7:00 = UTC prev day 23:00
workflow_call:

jobs:
daily_deps_version_check:
deps_version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -27,6 +28,11 @@ jobs:
command: outdated
args: -R --exit-code 1 --verbose

security_audit:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Security audit
uses: actions-rs/audit-check@v1
with:
Expand Down
36 changes: 5 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,25 @@ on:

jobs:

tag_check_deps_version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-outdated
uses: actions-rs/[email protected]
with:
crate: cargo-outdated
version: latest
use-tool-cache: true
- name: Check deps crates version
uses: actions-rs/cargo@v1
with:
command: outdated
args: -R --exit-code 1 --verbose
- name: Check Lock file updated
uses: actions-rs/cargo@v1
with:
command: generate-lockfile
args: --locked
- name: Security audit
uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
daily:
uses: ./.github/workflows/daily.yml

build:
uses: ./.github/workflows/build.yml
with:
name: fontfor

create_release:
needs: [tag_check_deps_version, build]
release:
needs: [daily, build]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
# Multi line outputs needs escaped before echo, ref:
# https://github.community/t5/GitHub-Actions/set-output-Truncates-Multiline-Strings/td-p/37870
- name: Get Tag Name and message
- name: Get message
id: tag
run: |
echo "::set-output name=name::$(echo $GITHUB_REF | cut -d/ -f3)"
message=$(echo "${{ github.event.head_commit.message }}" | tail -n +3)
message="${message//'%'/'%25'}"
message="${message//$'\n'/'%0A'}"
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/security_audit.yml

This file was deleted.

0 comments on commit 8597844

Please sign in to comment.