Skip to content

Instantly share code, notes, and snippets.

@srfrnk
Last active December 15, 2019 16:13
Show Gist options
  • Save srfrnk/6542b06f520c6f085a1a1b00298cf8a6 to your computer and use it in GitHub Desktop.
Save srfrnk/6542b06f520c6f085a1a1b00298cf8a6 to your computer and use it in GitHub Desktop.
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 "action@github.com"
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