Skip to content

Instantly share code, notes, and snippets.

@ashtom
Last active March 9, 2022 07:13
Show Gist options
  • Save ashtom/0ca3193ce0ac76f9c6bf0b3aa9cad124 to your computer and use it in GitHub Desktop.
Save ashtom/0ca3193ce0ac76f9c6bf0b3aa9cad124 to your computer and use it in GitHub Desktop.
GitHub Actions workflow for health repo
name: Build and Test
on:
push:
branches: [ main ]
paths:
- 'workouts/**.csv'
jobs:
build:
name: Gist Box
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby 2.7.x
uses: actions/setup-ruby@v1
with:
ruby-version: 2.7.x
- name: Cache gems
uses: actions/[email protected]
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Install gems
run: |
gem install octokit
- name: Run script to update gist
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GIST_ID: ${{ secrets.GIST_ID }}
run: |
ruby .github/scripts/hadge.rb -t $GH_TOKEN -g $GIST_ID workouts/2021.csv
@mpetrinidev
Copy link

master branch should be updated to main branch; the default for new repositories.

@ashtom
Copy link
Author

ashtom commented Mar 9, 2022

Thanks, done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment