Skip to content

server-update

server-update #21

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Update README with latest flutter server version
# Controls when the workflow will run
on:
repository_dispatch:
types: [server-update]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Update README with latest commit id and push to repo
run: |
echo "SERVER_VERSION:" ${{ github.event.client_payload.version }}
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git status
BRANCH_NAME=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
git pull --rebase origin main
git checkout -b run-test-upstream-${{ github.event.client_payload.version }}
git pull --rebase origin main
sed -i "s/appium_flutter_server: [0-9]*\.[0-9]*\.[0-9]*/appium_flutter_server: ${{ github.event.client_payload.version }}/" README.md
git add README.md
git commit -m "Update README with latest commit ID - ${{ github.event.client_payload.version }}"
git push -u origin run-test-upstream-${{ github.event.client_payload.version }}
gh pr create --title "docs: Update server version in ReadMe" --body "Test driver with latest server version"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}