Merge pull request #229 from mkantor/newer-twoslash-target #549
This file contains hidden or 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: Main | |
on: | |
push: | |
pull_request: | |
env: | |
IMAGE_NAME: bot | |
jobs: | |
main: | |
name: main | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: install node v16 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: yarn install | |
run: yarn install | |
- name: build | |
run: yarn run build | |
- name: lint | |
run: yarn run lint | |
- name: Set up Docker Buildx | |
if: contains(github.ref, 'master') | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Github Container Registry | |
if: contains(github.ref, 'master') | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GHCR_TOKEN }} | |
- name: Build and push | |
if: contains(github.ref, 'master') | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
cache-from: type=registry,ref=ghcr.io/typescript-community/bot:latest | |
cache-to: type=inline | |
tags: | | |
ghcr.io/typescript-community/bot:latest |