Skip to content

Add test action

Add test action #23

Workflow file for this run

name: test
on:
push:
tags:
- test*
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: referer-json
- name: Get datetime
id: datetime
run: echo "datetime=$(date "+%Y-%m-%d-%H%M%S")" >> "$GITHUB_ENV"
- name: Convert yaml to json
run: python .github/workflows/lib/yaml_to_json.py resources/referers.yml resources/referers-${{ steps.datetime.outputs.datetime }}.json
- name: Prepare latest json
run: cp resources/referers-${{ steps.datetime.outputs.datetime }}.json resources/referers-latest.json
- name: Commit and push new json files
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add resources/referers-${{ steps.datetime.outputs.datetime }}.json resources/referers-latest.json
git commit -m "Add referers-${{ steps.datetime.outputs.datetime }}.json"
git push