Skip to content

Merge upstream branches #14679

Merge upstream branches

Merge upstream branches #14679

Workflow file for this run

name: Merge upstream branches
on:
schedule:
- cron: '7 * * * *'
jobs:
merge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Merge upstream
run: |
git config --global user.name 'Katka92'
git config --global user.email 'kkanova@redhat.com'
# "git checkout master" is unnecessary, already here by default
git pull --unshallow # this option is very important, you would get
# complains about unrelated histories without it.
# (but actions/checkout@v2 can also be instructed
# to fetch all git depth right from the start)
git remote add upstream https://github.com/redhat-appstudio/infra-deployments.git
git fetch upstream
git merge upstream/main
git push origin main
- name: Slack alert on merge failure
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
CHANNEL_ID: "C04U7TA1BT8" # forum-rhtap-test-execution-alerts
run: |
curl -H "Authorization: Bearer ${SLACK_BOT_TOKEN}" -d "text=:alert-siren: infra-deployments upstream merge job failed" -d "channel=${CHANNEL_ID}" -X POST https://slack.com/api/chat.postMessage