Skip to content

Commit

Permalink
Remove unnecessary local foobara gem config from CI
Browse files Browse the repository at this point in the history
  • Loading branch information
azimux committed Aug 22, 2024
1 parent 39915f0 commit be10b88
Showing 1 changed file with 0 additions and 57 deletions.
57 changes: 0 additions & 57 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,63 +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/typescript-remote-command-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.TYPESCRIPT_REMOTE_COMMAND_GENERATOR_KEY_FOR_FOOBARA }}" | 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.TYPESCRIPT_REMOTE_COMMAND_GENERATOR_KEY_FOR_FOOBARA }}" | ssh-add - &&
git clone -b $foobara_branch --depth=1 [email protected]: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/typescript-remote-command-generator/foobara'" > .bundle/config
mkdir ../../foobara
ln -s ../../typescript-remote-command-generator/foobara ../../foobara/foobara
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down

0 comments on commit be10b88

Please sign in to comment.