Skip to content

Commit

Permalink
Remove CI code that fetches foobara from github
Browse files Browse the repository at this point in the history
  • Loading branch information
azimux committed Oct 27, 2024
1 parent 34d268d commit 85a91bf
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 81 deletions.
56 changes: 0 additions & 56 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,62 +14,6 @@ jobs:
timeout-minutes: 3
steps:
- uses: actions/checkout@v3
- name: setup ruby version and foobara branch and sha1
run: |
foobara_entry=`grep -A2 -m 1 ' remote: foobara$' Gemfile.lock`
regex="revision: ([0-9a-f]+)\s+branch: ([-_[:alnum:]]+)$"
if [[ $foobara_entry =~ $regex ]]; then
foobara_sha1="${BASH_REMATCH[1]}"
foobara_branch="${BASH_REMATCH[2]}"
echo foobara_sha1=$foobara_sha1 >> "$GITHUB_ENV"
echo foobara_branch=$foobara_branch >> "$GITHUB_ENV"
else
echo "$foobara_entry doesn't match $regex" >&2
fi
echo ruby_version=`cat .ruby-version` >> "$GITHUB_ENV"
- name: cache foobara
id: cache-foobara
uses: actions/cache@v3
env:
cache-name: cache-foobara
with:
path: ~/work/domain-generator/foobara
key: ${{ env.cache-name }}-${{ env.foobara_branch }}-${{ env.foobara_sha1 }}
restore-keys: |
${{ env.cache-name }}-${{ env.foobara_branch }}-
${{ env.cache-name }}-
- if: ${{ steps.cache-foobara.outputs.cache-hit != 'true' }}
name: clone or pull foobara
run: |
set -e
cd ..
if [ -d foobara ]; then
echo pulling
cd foobara
ssh-agent sh -c 'echo "${{ secrets.FOOBARA_KEY }}" | ssh-add - &&
git fetch --depth=1 origin $foobara_sha1 &&
if git rev-parse --verify -q $foobara_branch; then
git checkout -q $foobara_branch
git reset --hard $foobara_sha1
else
git branch $foobara_branch $foobara_sha1
git checkout -q $foobara_branch
fi'
else
echo cloning
ssh-agent sh -c 'echo "${{ secrets.FOOBARA_KEY }}" | ssh-add - &&
git clone -b $foobara_branch --depth=1 git@github.com:foobara/foobara.git'
fi
- name: symlink foobara and point bundler at it
run: |
set -e
mkdir -p .bundle
echo -e "---\nBUNDLE_LOCAL__FOOBARA: '/home/runner/work/domain-generator/foobara'" > .bundle/config
mkdir ../../foobara
ln -s ../../domain-generator/foobara ../../foobara/foobara
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
46 changes: 21 additions & 25 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ GEM
byebug (11.1.3)
coderay (1.1.3)
diff-lcs (1.5.1)
docile (1.4.0)
docile (1.4.1)
ffi (1.17.0-x86_64-linux-gnu)
foobara (0.0.1)
foobara (0.0.10)
foobara-util
foobara-files-generator (0.0.1)
foobara-files-generator (0.0.3)
foobara
foobara-rubocop-rules (0.0.3)
foobara-rubocop-rules (0.0.4)
rubocop
rubocop-rspec
foobara-spec-helpers (0.0.3)
foobara-util
foobara-util (0.0.4)
foobara-util (0.0.6)
formatador (1.1.0)
guard (2.18.1)
formatador (>= 0.2.4)
Expand All @@ -39,7 +39,7 @@ GEM
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
json (2.7.2)
json (2.7.4)
language_server-protocol (3.17.0.3)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
Expand All @@ -50,8 +50,8 @@ GEM
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
parallel (1.25.1)
parser (3.3.3.0)
parallel (1.26.3)
parser (3.3.5.0)
ast (~> 2.4.1)
racc
pry (0.14.2)
Expand All @@ -60,59 +60,55 @@ GEM
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
racc (1.8.0)
racc (1.8.1)
rainbow (3.1.1)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
regexp_parser (2.9.2)
rexml (3.3.0)
strscan
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-core (3.13.2)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.1)
rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-its (1.3.0)
rspec-its (1.3.1)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
rspec-mocks (3.13.1)
rspec-mocks (3.13.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubocop (1.64.1)
rubocop (1.67.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
rubocop-ast (1.32.3)
parser (>= 3.3.1.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (3.0.1)
rubocop-rspec (3.2.0)
rubocop (~> 1.61)
ruby-progressbar (1.13.0)
shellany (0.0.1)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov-html (0.13.1)
simplecov_json_formatter (0.1.4)
strscan (3.1.0)
thor (1.3.1)
unicode-display_width (2.5.0)
thor (1.3.2)
unicode-display_width (2.6.0)

PLATFORMS
x86_64-linux
Expand Down

0 comments on commit 85a91bf

Please sign in to comment.