Github actions now builds for Docker hub

dependabot/npm_and_yarn/typescript-eslint/parser-4.33.0
guusvanmeerveld 3 years ago
parent cdbbafb20d
commit ecb0253257

@ -6,18 +6,59 @@ on:
- master - master
jobs: jobs:
typescript: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Setup checkout - name: Setup checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Setup NodeJS v12 - name: Setup NodeJS v12
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: 12 node-version: 12
- name: Install Dependencies - name: Install Dependencies
run: yarn install run: yarn install
- name: Check for syntax errors - name: Check for syntax errors
run: yarn test-build run: yarn test-build
- name: ESlint check - name: ESlint check
run: yarn lint run: yarn lint
docker:
needs: test
runs-on: ubuntu-latest
steps:
- name: Setup checkout
uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1.10.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build and push
uses: docker/build-push-action@v2
with:
push: true
tags: guusvanmeerveld/portfolio:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
builder: ${{ steps.buildx.outputs.name }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

Loading…
Cancel
Save