Skip to content

Commit

Permalink
Merge pull request #5 from sangonzal/dev
Browse files Browse the repository at this point in the history
Release v.0.1.2
  • Loading branch information
sangonzal authored Oct 28, 2020
2 parents 88228fb + 67ac242 commit 89c7e56
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3
FROM python:3.8

# Tells pipenv to create virtualenvs in /root rather than $HOME/.local/share.
# We do this because GitHub modifies the HOME variable between `docker build` and
Expand Down
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@ After you have generated the PAT, go to the "Settings" tab of the repository, cl
Create a `workflow.yml` file and place in your `.github/workflows` folder. You can reference the action from this workflow. The only required parameter is setting the PAT that was generated when setting up the permissions.
```yaml
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Calculates traffic and clones and stores in CSV file
- name: Repository Traffic
id: traffic
uses: sangonzal/[email protected]
uses: sangonzal/[email protected]
env:
TRAFFIC_ACTION_TOKEN: ${{ secrets.TRAFFIC_ACTION_TOKEN }}
```
Expand All @@ -48,11 +44,12 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
ref: "traffic"
# Calculates traffic and clones and stores in CSV file
- name: GitHub traffic
id: traffic
uses: sangonzal/[email protected]
uses: sangonzal/[email protected]
env:
TRAFFIC_ACTION_TOKEN: ${{ secrets.TRAFFIC_ACTION_TOKEN }}
Expand All @@ -65,9 +62,12 @@ jobs:
add: "./traffic/*"
ref: "traffic" # commits to branch "traffic"
```
- Notes:
- Ensure that the ref used in actions/checkoutv2 is the same in Endbug/add-and-commit@v4.

### Sample workflow that runs weekly and uploads files to S3.

If you'd like to avoid commiting the data to the repository, you can use another action to upload elsewhere. For example, you could upload to S3 using the [S3 Sync action](https://github.com/marketplace/actions/s3-sync) .
If you'd like to avoid commiting the data to the repository, you can use another action to upload elsewhere. For example, you could download and upload files from S3 using other github actions.

```yaml
on:
Expand All @@ -85,11 +85,18 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Download from S3
- uses: prewk/s3-cp-action@master
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SOURCE: 's3://some-bucket/something-remote'
DEST: 'traffic'
# Calculates traffic and clones and stores in CSV file
- name: Repository Traffic
id: traffic
uses: sangonzal/[email protected]
uses: sangonzal/[email protected]
env:
TRAFFIC_ACTION_TOKEN: ${{ secrets.TRAFFIC_ACTION_TOKEN }}
Expand All @@ -103,4 +110,4 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SOURCE_DIR: 'traffic'
```
```

0 comments on commit 89c7e56

Please sign in to comment.