Cleanup Workflow

Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
divyansh42 2020-12-18 19:32:19 +05:30
parent d2594b7a96
commit a1b98d2603

View file

@ -13,30 +13,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# Fetch name of the Forked Repository with Branch
# if workflow is triggered from pull request
- name: Fetch PR head repo and branch name
if: github.event_name == 'pull_request'
run: |
HEAD_REPO_NAME=$(jq -r '.pull_request.head.repo.full_name' "$GITHUB_EVENT_PATH")
echo "PR head repo: $HEAD_REPO_NAME"
echo "repo=$HEAD_REPO_NAME" >> $GITHUB_ENV
echo "branch=$GITHUB_HEAD_REF" >> $GITHUB_ENV
# Extract repository name with branch
- name: Fetch Repository name with branch
if: github.event_name != 'pull_request'
shell: bash
run: |
echo "repo=$GITHUB_REPOSITORY" >> $GITHUB_ENV
echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
# Checkout buildah action github repository # Checkout buildah action github repository
- name: Checkout Buildah action - name: Checkout Buildah action
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: ${{ env.repo }}
ref: ${{ env.branch }}
path: "buildah-build" path: "buildah-build"
# Checkout spring-petclinic github repository # Checkout spring-petclinic github repository