|
1 | 1 | --- |
2 | | -name: Create README.md file |
| 2 | +run-name: 'Readme workflow' |
3 | 3 | on: |
4 | | - workflow_call: null |
| 4 | + workflow_call: |
| 5 | + secrets: |
| 6 | + TOKEN: |
| 7 | + required: true |
| 8 | + description: 'GitHub Token.' |
| 9 | + SLACK_WEBHOOK_TERRAFORM: |
| 10 | + required: true |
| 11 | + description: 'Slack webhook url.' |
| 12 | + |
5 | 13 | jobs: |
6 | | - readme-create: |
7 | | - name: readme-create |
| 14 | + readme-workflow: |
8 | 15 | runs-on: ubuntu-latest |
9 | 16 | steps: |
10 | | - - name: Checkout |
| 17 | + - name: Updating GitHub Token |
| 18 | + env: |
| 19 | + GITHUB_TOKEN: ${{ secrets.TOKEN }} |
| 20 | + run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV |
| 21 | + |
| 22 | + - name: checkout |
11 | 23 | uses: actions/checkout@master |
12 | | - - name: Set up Python 3.7 |
| 24 | + with: |
| 25 | + fetch-depth: 0 |
| 26 | + ref: master |
| 27 | + token: ${{ env.GH_TOKEN }} |
| 28 | + |
| 29 | + - name: 'Set up Python 3.7' |
13 | 30 | uses: actions/setup-python@v4 |
14 | 31 | with: |
15 | | - python-version: 3.x |
16 | | - - name: create readme |
17 | | - uses: clouddrove/[email protected] |
| 32 | + python-version: '3.x' |
| 33 | + |
| 34 | + - name: 'create readme' |
| 35 | + uses: 'clouddrove/[email protected]' |
18 | 36 | with: |
19 | | - actions_subcommand: readme |
20 | | - github_token: ${{ secrets.GITHUB }} |
| 37 | + actions_subcommand: 'readme' |
| 38 | + github_token: '${{ secrets.TOKEN }}' |
21 | 39 | env: |
22 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
23 | | - - name: pre-commit check errors |
| 40 | + GITHUB_TOKEN: ${{ secrets.TOKEN}} |
| 41 | + |
| 42 | + - name: 'pre-commit check errors' |
24 | 43 | uses: pre-commit/[email protected] |
25 | 44 | continue-on-error: true |
26 | | - - name: pre-commit fix erros |
| 45 | + |
| 46 | + - name: 'pre-commit fix erros' |
27 | 47 | uses: pre-commit/[email protected] |
28 | 48 | continue-on-error: true |
29 | | - - name: push readme |
30 | | - uses: clouddrove/[email protected] |
31 | | - continue-on-error: true |
| 49 | + |
| 50 | + - name: 'push readme' |
| 51 | + uses: 'clouddrove/[email protected]' |
32 | 52 | with: |
33 | | - actions_subcommand: push |
| 53 | + actions_subcommand: 'push' |
34 | 54 | env: |
35 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
36 | | - - name: Slack Notification |
| 55 | + GITHUB_TOKEN: ${{ secrets.TOKEN}} |
| 56 | + |
| 57 | + - name: 'Slack Notification' |
37 | 58 | uses: clouddrove/action-slack@v2 |
38 | 59 | with: |
39 | 60 | status: ${{ job.status }} |
40 | 61 | fields: repo,author |
41 | | - author_name: CloudDrove |
| 62 | + author_name: 'CloudDrove' |
42 | 63 | env: |
43 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 64 | + GITHUB_TOKEN: ${{ secrets.TOKEN }} |
44 | 65 | SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} |
45 | 66 | if: always() |
46 | 67 | ... |
0 commit comments