Last active
December 15, 2019 16:13
-
-
Save srfrnk/6542b06f520c6f085a1a1b00298cf8a6 to your computer and use it in GitHub Desktop.
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: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v1 | |
- name: Login to Image Registry | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin | |
- name: Node Setup | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "11.x" | |
- name: NPM Install | |
run: | | |
npm i | |
- name: Test/Verify | |
run: | | |
make tslint tsc jest | |
- name: Get current time | |
uses: srfrnk/current-time@master | |
id: current-time | |
with: | |
format: YYYYMMDD-HHmm | |
- name: Build | |
env: | |
TIMESTAMP: "${{ steps.current-time.outputs.formattedTime }}" | |
run: | | |
REGISTRY=docker.pkg.github.com/davfoundation/missioncontrol TIMESTAMP=$TIMESTAMP make --always-make build | |
- name: Push Images | |
env: | |
TIMESTAMP: "${{ steps.current-time.outputs.formattedTime }}" | |
run: | | |
REGISTRY=docker.pkg.github.com/davfoundation/missioncontrol TIMESTAMP=$TIMESTAMP make --always-make push-images | |
- name: Commit distribution files | |
env: | |
TIMESTAMP: "${{ steps.current-time.outputs.formattedTime }}" | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add k8s/dist/. | |
git commit -m "Version Distribution $TIMESTAMP" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment