binary-husky
Create docker-image.yml
caf7bf2 unverified
raw
history blame
1.04 kB
name: Build and push Docker image
on:
push:
branches:
- main
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_NAME: gpt-academic-nolocal
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v2
# Configure Docker Buildx
- name: Configure Docker Buildx
run: |
docker buildx create --name builder
docker buildx use builder
# Set up GitHub Packages registry
- name: Set up GitHub Packages registry
run: echo "${DOCKER_PASSWORD}" | docker login ghcr.io -u "${DOCKER_USERNAME}" --password-stdin
# Build and push the Docker image
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
dockerfile: docs/DockerfileNoLocal
push: true
tags: ghcr.io/${{ github.repository }}/${{ env.IMAGE_NAME }}:latest