Skip to content

Commit 748c07c

Browse files
committed
retry
1 parent 64f7e9e commit 748c07c

File tree

3 files changed

+41
-38
lines changed

3 files changed

+41
-38
lines changed

.github/workflows/pull_request.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: pulL_request
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Convert yaml to json
16+
run: python .github/workflows/lib/yaml_to_json.py resources/referers.yml referers.json
17+
- name: Check
18+
run: cat referers.json

.github/workflows/release.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,31 @@
11
name: test
22

3-
on: pull_request
3+
on:
4+
push:
5+
tags:
6+
- test*
7+
8+
permissions:
9+
contents: write
410

511
jobs:
6-
test:
12+
release:
713
runs-on: ubuntu-latest
814
steps:
915
- uses: actions/checkout@v4
16+
with:
17+
ref: referer-json
18+
- name: Get datetime
19+
id: datetime
20+
run: echo "datetime=$(date "+%Y-%m-%d-%H%M%S")" >> "$GITHUB_ENV"
1021
- name: Convert yaml to json
11-
run: python .github/workflows/lib/yaml_to_json.py resources/referers.yml referers.json
12-
- name: Check
13-
run: cat referers.json
22+
run: python .github/workflows/lib/yaml_to_json.py resources/referers.yml resources/referers-${{ steps.datetime.outputs.datetime }}.json
23+
- name: Prepare latest json
24+
run: cp resources/referers-${{ steps.datetime.outputs.datetime }}.json resources/referers-latest.json
25+
- name: Commit and push new json files
26+
run: |
27+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
28+
git config --local user.name "github-actions[bot]"
29+
git add resources/referers-${{ steps.datetime.outputs.datetime }}.json resources/referers-latest.json
30+
git commit -m "Add referers-${{ steps.datetime.outputs.datetime }}.json"
31+
git push

0 commit comments

Comments
 (0)