updates to make container image run as non-root #7
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 | |
on: | |
push: | |
tags: | |
- '1.*.*' | |
pull_request: | |
types: [opened, synchronize, reopened] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Yarn Build | |
run: | | |
echo install yarn... | |
yarn version | |
yarn install | |
yarn build | |
tar -czf release-${{ env.RELEASE_VERSION }}.tar.gz build | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: release-${{ env.RELEASE_VERSION }} | |
path: release-${{ env.RELEASE_VERSION }}.tar.gz | |
- name: Make Release | |
uses: softprops/action-gh-release@v0.1.5 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
release-${{ env.RELEASE_VERSION }}.tar.gz | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |