Skip to content

Commit

Permalink
Fix dependency updated workflow (#1447)
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelpasterz authored Jan 4, 2021
1 parent 1c4d5f2 commit 7059c10
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions .github/workflows/update_dependencies_and_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,27 @@ on:
workflow_dispatch: # or manually

jobs:
get_token_and_date:
get_date:
runs-on: ubuntu-latest
outputs:
github_token: ${{ steps.generate-token.outputs.token }}
date: ${{ steps.date.outputs.date }}
steps:
- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.FLANK_RELEASE_APP_ID }}
private_key: ${{ secrets.FLANK_RELEASE_PRIVATE_KEY }}

- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"

update_dependencies:
runs-on: macos-latest
needs: [ get_token_and_date ]
needs: [ get_date ]
steps:
- uses: actions/checkout@v2

- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.FLANK_RELEASE_APP_ID }}
private_key: ${{ secrets.FLANK_RELEASE_PRIVATE_KEY }}

- name: Gradle dependency updates raport
uses: eskatos/gradle-command-action@v1
with:
Expand All @@ -46,11 +45,11 @@ jobs:
id: pr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ needs.get_token_and_date.outputs.github_token }}
token: ${{ steps.generate-token.outputs.token }}
commit-message: "[Automatic PR] Dependencies update"
signoff: false
branch: "dependencies-update-${{ needs.get_token_and_date.outputs.date }}"
title: "build: Dependencies updates [${{ needs.get_token_and_date.outputs.date }}]"
branch: "dependencies-update-${{ needs.get_date.outputs.date }}"
title: "build: Dependencies updates [${{ needs.get_date.outputs.date }}]"
body: "Dependencies updates"
labels: |
automated pr
Expand All @@ -60,9 +59,16 @@ jobs:

update_firebase_api:
runs-on: macos-latest
needs: [ get_token_and_date ]
needs: [ get_date ]
steps:
- uses: actions/checkout@v2

- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.FLANK_RELEASE_APP_ID }}
private_key: ${{ secrets.FLANK_RELEASE_PRIVATE_KEY }}

- name: Setup python
uses: actions/setup-python@v2
with:
Expand All @@ -83,11 +89,11 @@ jobs:
id: pr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ needs.get_token_and_date.outputs.github_token }}
token: ${{ steps.generate-token.outputs.token }}
commit-message: "[Automatic PR] Firebase API Client update"
signoff: false
branch: "firebase-api-client-update-${{ needs.get_token_and_date.outputs.date }}"
title: "build: Firebase API Client update [${{ needs.get_token_and_date.outputs.date }}]"
branch: "firebase-api-client-update-${{ needs.get_date.outputs.date }}"
title: "build: Firebase API Client update [${{ needs.get_date.outputs.date }}]"
body: "Firebase Api update"
labels: |
automated pr
Expand Down

0 comments on commit 7059c10

Please sign in to comment.