Skip to content

Commit

Permalink
Get rid of duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
BramDC3 committed Sep 11, 2024
1 parent 34eabee commit cb30897
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 33 deletions.
21 changes: 21 additions & 0 deletions .github/actions/prepare-ubuntu-runner/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Prepare Ubuntu runner"
description: "Prepare Ubuntu runner"
runs:
using: "composite"
steps:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1.1" # TODO: keep this somewhere where it's easy to change

- name: Install gems
shell: bash
run: bundle install

- name: Install FVM
shell: bash
run: curl -fsSL https://fvm.app/install.sh | bash

- name: Set up FVM
shell: bash
run: fvm use
File renamed without changes.
36 changes: 3 additions & 33 deletions .github/workflows/release-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1.1" # TODO: keep this somewhere where it's easy to change

- name: Install gems
run: bundle install

- name: Install FVM
run: curl -fsSL https://fvm.app/install.sh | bash

- name: Set up FVM
run: fvm use
- uses: ./.github/actions/prepare-ubuntu-runner

- name: Run virtual machine tests
run: bundle exec fastlane run_vm_tests
Expand All @@ -36,19 +24,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1.1" # TODO: keep this somewhere where it's easy to change

- name: Install gems
run: bundle install

- name: Install FVM
run: curl -fsSL https://fvm.app/install.sh | bash

- name: Set up FVM
run: fvm use
- uses: ./.github/actions/prepare-ubuntu-runner

- name: Decode and save google-services.json
run: echo "${{ secrets.GOOGLE_SERVICES_JSON }}" | base64 -d > ./android/app/google-services.json
Expand Down Expand Up @@ -132,13 +108,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1.1" # TODO: keep this somewhere where it's easy to change

- name: Install gems
run: bundle install
- uses: ./.github/actions/prepare-ubuntu-runner

- name: Decode and save Firebase App Distribution service account
run: echo "${{ secrets.FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_JSON }}" | base64 -d > ./FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT.json
Expand Down

0 comments on commit cb30897

Please sign in to comment.