Add Gitea Actions workflow to build and push docker image
Some checks failed
Build & Push Docker Image to GHCR / build-and-push (push) Failing after 10s
Some checks failed
Build & Push Docker Image to GHCR / build-and-push (push) Failing after 10s
This commit is contained in:
32
.github/workflows/docker-build.yml
vendored
Normal file
32
.github/workflows/docker-build.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: Build & Push Docker Image to GHCR
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: kroonk/mischlabs
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ secrets.GHCR_USERNAME }}
|
||||
password: ${{ secrets.GHCR_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/kroonk/mischlabs:latest
|
||||
ghcr.io/kroonk/mischlabs:${{ github.sha }}
|
||||
Reference in New Issue
Block a user