Skip to content

Commit

Permalink
Add GH workflow (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
hack3rvaillant authored Nov 7, 2024
1 parent 7b6f0ac commit 0a6d1b6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
tests:
runs-on: "ubuntu-latest"
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Rotate Keys
run: |
touch ./.env
chmod +x ./rotate_keys.rb
./rotate_keys.rb
shell: bash
- name: Run RSpec tests
run: bundle exec rspec spec
2 changes: 0 additions & 2 deletions rotake_keys.rb → rotate_keys.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
puts "Private Key:"
private_key = rsa_key.to_pem
puts private_key
`sed -i '' '/JWT_SIGNING_PRIVATE_KEY/d' ./.env`
`echo 'JWT_SIGNING_PRIVATE_KEY="#{private_key}"' >> ./.env`

# Display the public key in PEM format
puts "\nPublic Key:"
public_key = rsa_key.public_key.to_pem
puts public_key
`sed -i '' '/JWT_SIGNING_PUBLIC_KEY/d' ./.env`
`echo 'JWT_SIGNING_PUBLIC_KEY="#{public_key}"' >> ./.env`

0 comments on commit 0a6d1b6

Please sign in to comment.