-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 995 Bytes
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Build, Publish and Deploy Web
on:
workflow_dispatch:
push:
branches:
- dev
env:
IMAGE: ghcr.io/thinc-org/awesome-stack-discord-bot
jobs:
build:
name: Build and Publish Docker Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to the Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v2
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
with:
context: .
file: Dockerfile
push: true
tags: ${{ env.IMAGE }}
cache-from: type=gha
cache-to: type=gha,mode=max