From 2531cbd83f819b3994313c32909c8f02e66b26ca Mon Sep 17 00:00:00 2001 From: MerelHudepohl Date: Thu, 1 Aug 2024 16:03:42 +0200 Subject: [PATCH] Updated workflows --- .github/workflows/homey-app-publish.yml | 20 ++++++++++++--- .github/workflows/homey-app-translate.yml | 31 ++++++++++++++++++++--- .github/workflows/homey-app-validate.yml | 13 +++++++--- .github/workflows/homey-app-version.yml | 29 +++++++++++++++++---- 4 files changed, 76 insertions(+), 17 deletions(-) diff --git a/.github/workflows/homey-app-publish.yml b/.github/workflows/homey-app-publish.yml index 6245508..8d6a2b4 100644 --- a/.github/workflows/homey-app-publish.yml +++ b/.github/workflows/homey-app-publish.yml @@ -3,7 +3,19 @@ name: Publish Homey App on: workflow_dispatch: -jobs: - main: - uses: athombv/athom-github-workflow/.github/workflows/homey-app-publish.yml@master - secrets: inherit \ No newline at end of file +jobs: + publish-app: + name: Publish App + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Publish + uses: athombv/github-action-homey-app-publish@master + id: publish + with: + personal_access_token: ${{ secrets.HOMEY_PAT }} + + - name: URL + run: | + echo "Manage your app at ${{ steps.publish.outputs.url }}." >> $GITHUB_STEP_SUMMARY \ No newline at end of file diff --git a/.github/workflows/homey-app-translate.yml b/.github/workflows/homey-app-translate.yml index d0f2d2a..930ec02 100644 --- a/.github/workflows/homey-app-translate.yml +++ b/.github/workflows/homey-app-translate.yml @@ -1,8 +1,31 @@ name: Translate Homey App + on: workflow_dispatch: -jobs: - main: - uses: athombv/athom-github-workflow/.github/workflows/homey-app-translate.yml@master - secrets: inherit \ No newline at end of file +jobs: + main: + name: Translate App + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Translate Homey App + uses: athombv/github-action-homey-app-translate@master + with: + openai_api_key: ${{ secrets.OPENAI_API_KEY }} + + - name: Commit, Push & Create Pull Request + env: + GH_TOKEN: ${{ github.token }} + run: | + git config --local user.email "sysadmin+githubactions@athom.com" + git config --local user.name "Homey Github Actions Bot" + + git checkout -b feature/openai-translations + + git add -A + git commit -m "Automatic translations with OpenAI" + git push --set-upstream origin feature/openai-translations + + gh pr create --fill \ No newline at end of file diff --git a/.github/workflows/homey-app-validate.yml b/.github/workflows/homey-app-validate.yml index 02c1fca..d8a06ca 100644 --- a/.github/workflows/homey-app-validate.yml +++ b/.github/workflows/homey-app-validate.yml @@ -2,7 +2,12 @@ name: Validate Homey App on: workflow_dispatch: -jobs: - main: - uses: athombv/athom-github-workflow/.github/workflows/homey-app-validate.yml@master - secrets: inherit +jobs: + main: + name: Validate Homey App + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: athombv/github-action-homey-app-validate@master + with: + level: verified \ No newline at end of file diff --git a/.github/workflows/homey-app-version.yml b/.github/workflows/homey-app-version.yml index 6090e0a..cbf887f 100644 --- a/.github/workflows/homey-app-version.yml +++ b/.github/workflows/homey-app-version.yml @@ -17,10 +17,29 @@ on: description: Changelog required: true + jobs: main: - uses: athombv/athom-github-workflow/.github/workflows/homey-app-version.yml@master - secrets: inherit - with: - version: ${{ github.event.inputs.version }} - changelog: ${{ github.event.inputs.changelog }} \ No newline at end of file + name: Update App Version + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v3 + + - name: Update App Version + uses: athombv/github-action-homey-app-version@master + id: update_app_version + with: + version: ${{ github.event.inputs.version }} + changelog: ${{ github.event.inputs.changelog }} + + - name: Commit & Push + run: | + git config --local user.email "sysadmin+githubactions@athom.com" + git config --local user.name "Homey Github Actions Bot" + + git add -A + git commit -m "Update Homey App Version to v${{ steps.update_app_version.outputs.version }}" + git tag "v${{ steps.update_app_version.outputs.version }}" + + git push origin HEAD --tags \ No newline at end of file