Skip to content

Merge pull request #237 from LabKey/fb_merge_23.3_to_develop #978

Merge pull request #237 from LabKey/fb_merge_23.3_to_develop

Merge pull request #237 from LabKey/fb_merge_23.3_to_develop #978

Workflow file for this run

name: Build DISCVR
on:
workflow_dispatch:
push:
branches:
- "*"
tags-ignore:
- latest
pull_request:
jobs:
build-modules:
# See: https://help.github.com/en/actions/reference/contexts-and-expression-syntax-for-github-actions#github-context
# https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables
if: github.repository == 'BimberLab/DiscvrLabKeyModules'
runs-on: ubuntu-latest
steps:
- name: "Find default branch"
uses: octokit/[email protected]
id: get_default_branch
with:
route: GET /repos/${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
- name: "Print default branch"
run: |
DEFAULT_BRANCH='${{ fromJson(steps.get_default_branch.outputs.data).default_branch }}'
echo 'Default branch: '$DEFAULT_BRANCH
echo "DEFAULT_BRANCH=${DEFAULT_BRANCH}" >> $GITHUB_ENV
id: default-branch
- name: "Build DISCVR"
uses: bimberlabinternal/DevOps/githubActions/discvr-build@master
with:
artifactory_user: ${{secrets.artifactory_user}}
artifactory_password: ${{secrets.artifactory_password}}
# NOTE: permissions are limited on the default secrets.GITHUB_TOKEN, including updating workflows, so use a personal access token
github_token: ${{ secrets.PAT }}
env:
# Only generate the distribution if this is the default branch
GENERATE_DIST: ${{ env.DEFAULT_BRANCH == github.ref_name && '1' || '0' }}
- name: Publish Release
if: ${{ env.DEFAULT_BRANCH == github.ref_name && github.event_name == 'push' && github.base_ref == '' }}
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.PAT }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build: ${{ env.DEFAULT_BRANCH }}"
files: /home/runner/work/_temp/_github_home/lkDist/discvr/DISCVR-*