Skip to content

Commit

Permalink
branch as input for premerge workflow (#1683)
Browse files Browse the repository at this point in the history
branch as input allowing manual workflow dispatch
  • Loading branch information
TrevorBenson authored Sep 3, 2023
1 parent 79282b9 commit 7caa740
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/premerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 . \
Expand Down

0 comments on commit 7caa740

Please sign in to comment.