Skip to content

Autoupdate

Autoupdate #1165

Workflow file for this run

name: Autoupdate
on:
schedule:
- cron: "0 1 * * *"
workflow_dispatch:
workflow_call:
concurrency:
group: "${{ github.workflow }} @ ${{ github.ref }}"
cancel-in-progress: false
permissions:
contents: write
actions: write
jobs:
update:
env:
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }}
GOOGLE_APPLICATION_CREDENTIALS: ${{ github.workspace }}/tmp/serviceAccount.json
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
updated: ${{ steps.autoupdate.outputs.updated }}
version: ${{ steps.autoupdate.outputs.version }}
steps:
- name: Сheckout repo
id: checkout_repo
uses: actions/checkout@v6
with:
path: "tmp"
ref: "main"
- name: Set service account
id: set_service_account
run: echo $SERVICE_ACCOUNT>serviceAccount.json
working-directory: ${{ github.workspace }}/tmp
- name: Autoupdate
id: autoupdate
uses: siarheidudko/autoupdater@v3
with:
author-email: "slavianich@gmail.com"
author-name: "Siarhei Dudko"
working-directory: ${{ github.workspace }}/tmp
ref: ${{ github.repository }}
branch: "main"
builds-and-checks: |
npm test
debug: "true"
deploy:
runs-on: ubuntu-latest
needs: update
if: needs.update.outputs.updated == 'true'
steps:
- name: Trigger Build and Deploy Workflow
uses: benc-uk/workflow-dispatch@v1
with:
workflow: build-and-deploy.yml
ref: main
inputs: '{ "tag": "${{ needs.update.outputs.version }}" }'