Skip to content

Commit

Permalink
Merge pull request #32 from Code-Hex/fix/lib
Browse files Browse the repository at this point in the history
tmp - add Build docker image and push it
  • Loading branch information
Code-Hex authored Nov 30, 2020
2 parents f49e14e + 6e6f187 commit 338d211
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 76 deletions.
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.github
tests
src
node_modules
.prettierrc.json
jest.config.js
tsconfig*
action.yml
LICENSE
48 changes: 48 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "Build Docker Image"

on:
push:
tags:
- 'v*'
pull_request:

# https://github.com/docker/build-push-action/issues/127#issuecomment-695366990
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup
uses: actions/setup-node@v1
with:
node-version: '14'
- name: Install Dependencies
run: yarn install
- name: Build code
run: yarn build
- name: Set vars
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: auto-milestone-binder/auto-milestone-binder
tag-sha: true
- name: Login
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Push to GitHub Packages
uses: docker/build-push-action@v2
with:
context: .
push: true
# tags: <org-name>/<repo-name>/<app-name>:<tag>
tags: |
ghcr.io/code-hex/auto-milestone-binder:${{ steps.vars.outputs.sha_short }}
ghcr.io/code-hex/auto-milestone-binder:latest
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package-lock.json
node_modules
.vscode
lib/main.js
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ inputs:
required: true
runs:
using: 'docker'
image: 'Dockerfile'
image: 'ghcr.io/code-hex/auto-milestone-binder:latest'
Empty file added lib/.gitkeep
Empty file.
75 changes: 0 additions & 75 deletions lib/main.js

This file was deleted.

0 comments on commit 338d211

Please sign in to comment.