Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
rmoreliovlabs committed Sep 1, 2024
1 parent 38f938c commit 7c18042
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions .github/workflows/rit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- "master"
- "*-rc"
pull_request:
types: [opened, reopened, synchronize]
branches:
- "**"
workflow_dispatch:
inputs:
rit-branch:
Expand All @@ -21,25 +25,37 @@ jobs:
name: Rootstock Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: write
packages: write
issues: read
pull-requests: write
actions: read
deployments: read
steps:
- name: Set Branch Variables
id: set-branch-variables
run: |
# Default values
RSKJ_BRANCH="unknown"
RIT_BRANCH="${{ github.event.inputs.rit-branch || 'main' }}"
POWPEG_BRANCH="${{ github.event.inputs.powpeg-branch || 'master' }}"
if [[ "${{ github.event_name }}" == "push" ]]; then
# Determine branch name for push event
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "RSKJ_BRANCH=master" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == refs/heads/*-rc ]]; then
branch_name="${{ github.ref#refs/heads/}}"
echo "RSKJ_BRANCH=$branch_name" >> $GITHUB_ENV
RSKJ_BRANCH="master"
elif [[ "${{ github.ref }}" =~ refs/heads/(.*)-rc ]]; then
RSKJ_BRANCH="${BASH_REMATCH[1]}-rc"
else
RSKJ_BRANCH="${{ github.ref#refs/heads/ }}"
fi
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
# Use the PR branch name for pull request events
echo "RSKJ_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
RSKJ_BRANCH="${{ github.event.pull_request.head.ref }}"
fi
echo "RIT_BRANCH=${{ github.event.inputs.rit-branch }}" >> $GITHUB_ENV
echo "POWPEG_BRANCH=${{ github.event.inputs.powpeg-branch }}" >> $GITHUB_ENV
echo "RSKJ_BRANCH=$RSKJ_BRANCH" >> $GITHUB_ENV
echo "RIT_BRANCH=$RIT_BRANCH" >> $GITHUB_ENV
echo "POWPEG_BRANCH=$POWPEG_BRANCH" >> $GITHUB_ENV
echo "RSKJ_BRANCH=${{ env.RSKJ_BRANCH }}"
echo "RIT_BRANCH=${{ env.RIT_BRANCH }}"
Expand Down

0 comments on commit 7c18042

Please sign in to comment.