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

60 lines
1.7 KiB
YAML
Raw Normal View History

2020-12-29 13:12:03 +00:00
name: CodeQL + Docker Image
2020-09-10 18:38:33 +00:00
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:
2020-12-29 13:12:03 +00:00
name: CodeQL Analysis
2020-12-29 13:01:02 +00:00
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:12:03 +00:00
name: Build Docker Image
2020-12-29 13:01:02 +00:00
needs: analyze
2020-12-15 01:44:28 +00:00
runs-on: ubuntu-latest
steps:
2020-12-29 13:12:03 +00:00
- name: Checkout repository
2020-12-15 01:44:28 +00:00
uses: actions/checkout@v2
2020-12-29 13:12:03 +00:00
with:
fetch-depth: 2
2020-12-15 01:44:28 +00:00
- name: Install Docker BuildX
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
buildx-version: latest
2020-12-29 13:12:03 +00:00
2020-12-15 01:44:28 +00:00
- name: Login to Docker Hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
2020-12-29 13:12:03 +00:00
2020-12-15 01:44:28 +00:00
- name: Build the image
run: |
docker buildx build \
--tag keanucode/travbot-v3:latest \
--platform linux/amd64,linux/arm/v7,linux/arm64 --push .