Docker Build GHCR #1
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: Docker Build GHCR | |
env: | |
DOCKER_BUILDKIT: 1 | |
imageName: ghcr.io/${{ github.repository_owner }}/kutt:latest | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
- actions-debugging | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Log in to GHCR | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Docker image | |
run: | | |
docker build -t ${{ env.imageName }} . | |
- name: Push Docker image | |
run: | | |
docker push ${{ env.imageName }} |