Merge dev to main #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |