diff --git a/.github/workflows/premerge.yml b/.github/workflows/premerge.yml index f75d13387..ef675d7e4 100644 --- a/.github/workflows/premerge.yml +++ b/.github/workflows/premerge.yml @@ -2,6 +2,10 @@ name: Pre-merge on: workflow_dispatch: + inputs: + branch: + description: 'Branch to test' + required: true pull_request: paths: - scripts/cnode-helper-scripts/guild-deploy.sh @@ -16,6 +20,7 @@ jobs: distro: [rockylinux, ubuntu] env: REGISTRY: ghcr.io + BRANCH: ${{ github.event.inputs.branch || '' }} if: github.event.pull_request.draft == false steps: - name: Provide additional free space @@ -42,9 +47,13 @@ jobs: - uses: actions/checkout@v3 - name: Define BRANCH, COMMIT and G_ACCOUNT in environment run: | - echo "BRANCH=${GITHUB_HEAD_REF}" >> $GITHUB_ENV echo "G_ACCOUNT=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV - echo "COMMIT=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV + if [[ -z ${{ env.BRANCH }} ]]; then + echo "BRANCH=${GITHUB_HEAD_REF}" >> $GITHUB_ENV + echo "COMMIT=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV + else + echo "COMMIT=$(git rev-parse --short ${{ env.BRANCH }})" >> $GITHUB_ENV + fi - name: Testing guild-deploy.sh (IO fork of libsodium) run: | docker build . \