Update Dockerfile #8
This file contains 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: 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 |