36 lines
774 B
YAML
36 lines
774 B
YAML
|
name: Build and Push Docker Image
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches: [ main ]
|
||
|
pull_request:
|
||
|
branches: [ main ]
|
||
|
|
||
|
env:
|
||
|
REGISTRY: gitea.rannes.dev/rannes.dev
|
||
|
IMAGE_NAME: ${{ github.repository }}
|
||
|
|
||
|
jobs:
|
||
|
build-and-push:
|
||
|
runs-on: ubuntu-latest
|
||
|
permissions:
|
||
|
contents: read
|
||
|
packages: write
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v4
|
||
|
|
||
|
# - name: Log in to GitHub Container Registry
|
||
|
# uses: docker/login-action@v3
|
||
|
# with:
|
||
|
# registry: ${{ env.REGISTRY }}
|
||
|
# username: ${{ github.actor }}
|
||
|
# password: ${{ secrets.GITHUB_TOKEN }}
|
||
|
|
||
|
- name: Build and push Docker image
|
||
|
uses: docker/build-push-action@v5
|
||
|
with:
|
||
|
context: .
|
||
|
push: true
|
||
|
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|