Skip to content

Commit

Permalink
细节调整
Browse files Browse the repository at this point in the history
  • Loading branch information
hugcabbage committed Oct 29, 2022
1 parent 2b5354e commit 04a612d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
26 changes: 11 additions & 15 deletions .github/workflows/produce.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ on:
inputs:
initfile:
description: 'init file path'
type: string
required: false
type: string
default: 'templet/init'
deploydir:
description: 'directory to place output files'
type: string
required: true
type: string
default: 'produce'
overwrite_spec:
description: 'overwrite specific run, can only accept single <serial>, like 1'
Expand All @@ -24,30 +24,26 @@ on:
overwrite_last:
description: 'overwrite last run'
required: false
type: choice
options:
- 'false'
- 'true'
type: boolean
delete_all:
description: 'delete all runs'
required: false
type: choice
options:
- 'false'
- 'true'
type: boolean

jobs:
build:
produce:
runs-on: ubuntu-latest
env:
REPO_PATH: test
PRODUCE_DEVICE: ${{ secrets.PRODUCE_DEVICE }}
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
if: env.PRODUCE_DEVICE != ''
with:
path: ${{ env.REPO_PATH }}
token: ${{ env.PRODUCE_DEVICE }}

- name: carry out
if: env.PRODUCE_DEVICE != ''
run: python ${{ env.REPO_PATH }}/templet/produce.py
Expand All @@ -58,14 +54,14 @@ jobs:
OVERWRITE_SPEC: ${{ inputs.overwrite_spec }}
DELETE_SPEC: ${{ inputs.delete_spec }}
DELETE_ALL: ${{ inputs.delete_all }}

- uses: stefanzweifel/git-auto-commit-action@v4
if: env.PRODUCE_DEVICE != ''
with:
repository: ${{ env.REPO_PATH }}
commit_message: device deployment changed
commit_user_name: github-actions[bot]
commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com
commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

- name: lack token print
if: env.PRODUCE_DEVICE == ''
run: echo 'Have no token, workflow exits!'
4 changes: 1 addition & 3 deletions .github/workflows/refresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,4 @@ jobs:
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: .config files refreshed
commit_user_name: github-actions[bot]
commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com
commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

0 comments on commit 04a612d

Please sign in to comment.