TravBot-v3/.github/workflows/image.yml

55 lines
1.6 KiB
YAML
Raw Normal View History

2020-09-10 18:38:33 +00:00
name: Build Docker Image + Push
on:
2020-12-15 01:44:28 +00:00
push:
branches:
- typescript
- docker
2020-09-10 18:38:33 +00:00
jobs:
2020-12-29 13:01:02 +00:00
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Setup Node.JS
uses: actions/setup-node@v2-beta
with:
node-version: "12"
- run: npm ci
- name: Build codebase
run: npm run build
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
config-file: ./.github/codeql/codeql-config.yml
languages: javascript
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
2020-12-15 01:44:28 +00:00
build:
2020-12-29 13:01:02 +00:00
needs: analyze
2020-12-15 01:44:28 +00:00
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Docker BuildX
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
buildx-version: latest
- name: Login to Docker Hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Build the image
run: |
docker buildx build \
--tag keanucode/travbot-v3:latest \
--platform linux/amd64,linux/arm/v7,linux/arm64 --push .