Skip to content

Commit 65b7cf8

Browse files
authored
Add test action (#240)
1 parent f306c5b commit 65b7cf8

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/test.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: test
2+
3+
on:
4+
push:
5+
tags:
6+
- test*
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- 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"
21+
- name: Convert yaml to json
22+
run: python .github/workflows/lib/yaml_to_json.py resources/referers.yml resources/referers-$datetime.json
23+
- name: Prepare latest json
24+
run: cp resources/referers-$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-$datetime.json resources/referers-latest.json
30+
git commit -m "Add referers-$datetime.json"
31+
git push
32+
- name: Print test referer json URLs
33+
run: |
34+
echo https://raw.githubusercontent.com/snowplow-referer-parser/referer-parser/refs/heads/referer-json/resources/referers-$datetime.json
35+
echo https://raw.githubusercontent.com/snowplow-referer-parser/referer-parser/refs/heads/referer-json/resources/referers-latest.json

0 commit comments

Comments
 (0)