Skip to content

Merge dev to main

Merge dev to main #12

name: Merge dev to main
on:
workflow_dispatch:
jobs:
merge:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout dev branch
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Push dev to main
env:
GH_TOKEN: ${{ secrets.GH_PAT }}
run: |
git config user.name github-actions
git config user.email [email protected]
if [ -z "$GH_TOKEN" ]; then
echo "Error: GH_PAT is not set"
exit 1
fi
git fetch --all
git pull origin main
git checkout dev
git pull origin main
git push https://${GH_TOKEN}@github.com/earthfast/dashboard-runner.git dev:main