Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to GitHub actions #226

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/lib/yaml_to_json.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import sys
import yaml
import json

with open(sys.argv[1], 'r') as input:
yml = yaml.safe_load(input)

with open(sys.argv[2], 'w') as output:
json.dump(yml, output)
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: release

on:
push:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Convert yaml to json
run: python .github/workflows/lib/yaml_to_json.py resources/referers.yml referers.json
- name: Get datetime
id: datetime
run: echo "datetime=$(date "+%Y-%m-%d-%H%M%S")" >> $GITHUB_OUTPUT
- name: Tag
run: git tag ${{ steps.datetime.outputs.datetime }} && git push --tags
- name: Create GitHub release and attach referers.json
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.datetime.outputs.datetime }}
files: ./referers.json
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: test

on: pull_request

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Convert yaml to json
run: python .github/workflows/lib/yaml_to_json.py resources/referers.yml referers.json
- name: Check
run: cat referers.json
17 changes: 0 additions & 17 deletions .gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions .travis.yml

This file was deleted.

17 changes: 0 additions & 17 deletions CHANGELOG

This file was deleted.

11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@ The latest database is always available on this URL:
https://s3-eu-west-1.amazonaws.com/snowplow-hosted-assets/third-party/referer-parser/referers-latest.yaml
https://s3-eu-west-1.amazonaws.com/snowplow-hosted-assets/third-party/referer-parser/referers-latest.json

The database is updated at most once a month. Each new version of the database is also uploaded with a timestamp:
The database is updated every day. Each new version of the database is also uploaded with a timestamp:

https://s3-eu-west-1.amazonaws.com/snowplow-hosted-assets/third-party/referer-parser/referers-YYYYMMDD.yaml
https://s3-eu-west-1.amazonaws.com/snowplow-hosted-assets/third-party/referer-parser/referers-YYYYMMDD.json

Example:

https://s3-eu-west-1.amazonaws.com/snowplow-hosted-assets/third-party/referer-parser/referers-20200331.yaml
https://s3-eu-west-1.amazonaws.com/snowplow-hosted-assets/third-party/referer-parser/referers-20200331.json

If there is an issue with the database necessitating a re-release within the month, the corresponding files will be overwritten.

## Language-specific repositories

- Scala: https://github.com/snowplow-referer-parser/scala-referer-parser
Expand Down Expand Up @@ -78,9 +77,7 @@ We welcome contributions to referer-parser:

## Support

General support for referer-parser is handled by the team at Snowplow Analytics Ltd.

You can contact the Snowplow Analytics team through any of the [channels listed on their wiki][talk-to-us].
General support for `referer-parser` is handled by Snowplow Analytics team on [discourse][discourse].

## Copyright and license

Expand All @@ -90,6 +87,8 @@ You can contact the Snowplow Analytics team through any of the [channels listed

[snowplow]: https://github.com/snowplow/snowplow

[discourse]: https://discourse.snowplow.io

[piwik]: http://piwik.org
[piwik-search-engines]: https://github.com/piwik/piwik/blob/master/core/DataFiles/SearchEngines.php
[piwik-socials]: https://github.com/piwik/piwik/blob/master/core/DataFiles/Socials.php
Expand Down
19 changes: 0 additions & 19 deletions Vagrantfile

This file was deleted.

23 changes: 0 additions & 23 deletions composer.json

This file was deleted.

103 changes: 0 additions & 103 deletions sync_data.py

This file was deleted.

3 changes: 0 additions & 3 deletions vagrant/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions vagrant/ansible.hosts

This file was deleted.

14 changes: 0 additions & 14 deletions vagrant/peru.yaml

This file was deleted.

50 changes: 0 additions & 50 deletions vagrant/up.bash

This file was deleted.

3 changes: 0 additions & 3 deletions vagrant/up.guidance

This file was deleted.

3 changes: 0 additions & 3 deletions vagrant/up.playbooks

This file was deleted.