BUILD Linux #115
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: BUILD Linux | |
on: | |
push: | |
tags: | |
- 'v*.**' | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
type: boolean | |
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | |
required: false | |
default: false | |
tag_name: | |
type: string | |
description: 'Tag name' | |
required: false | |
default: '' | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19 | |
- name: Set Go module | |
run: | | |
go env -w GO111MODULE=on | |
- name: Check out code into current branch | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Set Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '14' | |
- name: Setup tmate session | |
uses: mxschmitt/action-tmate@v3 | |
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
- name: Node build | |
run: | | |
cd web/omsUI | |
yarn install --registry http://registry.yarnpkg.com/ --no-lockfile | |
yarn run build | |
- name: Make all | |
run: | | |
make all | |
env: | |
release_name: ${{ inputs.tag_name != '' && inputs.tag_name || github.ref_name }} | |
- name: Draft release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body: Release for new version | |
files: | | |
./release/* | |
./configs/config.yaml.example | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker login | |
run: | | |
docker login docker.pkg.github.com -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} | |
- name: Push to GitHub Packages | |
uses: docker/build-push-action@v1 | |
with: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
registry: docker.pkg.github.com | |
repository: ssbeatty/oms/oms | |
tag_with_ref: true |