Skip to content

Commit

Permalink
Create json
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitriy-chernysh committed Oct 9, 2024
1 parent e47486b commit d22b593
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 6 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/create-service-json.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Create Release Notes

on:
# Enables this workflow to be called from other workflows
workflow_call:

jobs:
create-release-notes:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Create Google Service JSON
run: |
echo "${{ secrets.GOOGLE_SERVICE_JSON }}" > \
${{ github.workspace }}/app/google-services.json | base64
- name: Check Google Service JSON file is created
run: |
if [ -f ./app/google-services.json ]; then
echo "google-services.json exists."
else
echo "google-services.json does not exist." >&2
exit 1
fi
continue-on-error: false
7 changes: 6 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ jobs:
uses: ./.github/workflows/create-release-notes.yml
secrets: inherit

create-service-json:
uses: ./.github/workflows/create-service-json.yml
needs: create-release-notes
secrets: inherit

build-signed-bundle:
uses: ./.github/workflows/build-signed-bundle.yml
needs: create-release-notes
needs: create-service-json
secrets: inherit

create-github-release:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ name: Run Unit Tests

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Enables this workflow to be called from other workflows
workflow_call:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Run Tests

on:

# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main", "improve-actions" ]
pull_request:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:

create-service-json:
uses: ./.github/workflows/create-service-json.yml
secrets: inherit

run-tests:
uses: ./.github/workflows/run-tests.yml
needs: create-service-json
secrets: inherit

0 comments on commit d22b593

Please sign in to comment.