-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (65 loc) · 2.75 KB
/
update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Update copa-america.json datasets (Read in Football.TXT & Generate JSON)
on:
push:
paths:
- '2024--usa/copa.txt'
# schedule:
# note: * is a special character in YAML so you have to quote this string
# see cron guru for more examples / help on syntax
# -> https://crontab.guru/examples.html
# - cron: '0 22 1,15 * *' # every 1 & 15 of the month at 22:00 (utc?)
# note: change to weekly every thursday
# - cron: '0 22 * * THU' # every thursday at 22:00 (utc?)
workflow_dispatch:
### for testing / debugging allow "manual" start
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/.github/workflows/Gemfile
##
## plus try with
## bundle lock --add-platform PLATFORM
## to pre-generate lock file
## platform for ubuntu-latest is: x86_64-linux
## try
## $ bundle lock --add-platform=x86_64-linux --gemfile=.github/workflows/Gemfile
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2' # Version range or exact version of a Ruby version to use, using semvers version range syntax.
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: try misc debug stuff
run: |
echo ${{ github.workspace }}
echo $GITHUB_WORKSPACE
gem list
gem env
echo 'loadpath setup v1:'
ruby -e 'pp $:'
echo 'loadpath setup v2:'
ruby -r 'bundler/setup' -e 'pp $:'
echo 'loadpath setup v3:'
bundle exec ruby -e 'pp $:'
echo $BUNDLE_GEMFILE
#=> /home/runner/work/copa-america/copa-america
#=> /home/runner/work/copa-america/copa-america
- name: run install / add user
env:
SSH_KEY: ${{ secrets.SSH_KEY }}
run: |
bundle exec yo -f .github/workflows/Flowfile.rb adduser
## bundle install --gemfile=.github/workflows/Gemfile
## yo -f .github/workflows/Flowfile.rb adduser
- name: Run ssh_clone
run: bundle exec yo -f .github/workflows/Flowfile.rb clone
- name: gen json
run: bundle exec ruby .github/workflows/genjson.rb
# add -r 'bundler/setup' - why? why not?
- name: Run ssh_push
run: bundle exec yo -f .github/workflows/Flowfile.rb push