Skip to content

Merge pull request #504 from Appsilon/upgrade-cypress #54

Merge pull request #504 from Appsilon/upgrade-cypress

Merge pull request #504 from Appsilon/upgrade-cypress #54

Workflow file for this run

# This workflow initializes a fresh Rhino app and pushes it to a dedicated orphan branch.
# This way we can test the app CI (the GitHub Actions workflow created on `rhino::init()`).
name: App Push Test
on:
push:
branches: [main]
workflow_dispatch:
permissions: {}
jobs:
main:
name: Push fresh app
runs-on: ubuntu-latest
timeout-minutes: 30
env:
BRANCH_NAME: bot/app-push-test
steps:
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install Rhino
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: Appsilon/rhino@${{ github.sha }}
- name: Checkout repository
uses: actions/checkout@v3
with:
# The default GITHUB_PAT has insufficient permissions to push workflow changes.
# The token passed here must have write access to code and workflows.
token: ${{ secrets.APP_PUSH_TEST_PAT }}
- name: Prepare branch
run: git switch --orphan "$BRANCH_NAME"
- name: Initialize app
shell: Rscript {0}
run: rhino::init()
- name: Push branch
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git add .
git commit --message "App Push Test ($GITHUB_REF_NAME)"
git push --force origin "$BRANCH_NAME"