32 lines
678 B
YAML
32 lines
678 B
YAML
|
name: Build and Push Docker Image
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches: [ main ]
|
||
|
pull_request:
|
||
|
branches: [ main ]
|
||
|
|
||
|
jobs:
|
||
|
build-and-push:
|
||
|
runs-on: ubuntu-latest
|
||
|
permissions:
|
||
|
contents: read
|
||
|
packages: write
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v4
|
||
|
|
||
|
- name: Log in to Gitea Container Registry
|
||
|
uses: docker/login-action@v3
|
||
|
with:
|
||
|
registry: ${{ secrets.REGISTRY }}
|
||
|
username: ${{ secrets.USER }}
|
||
|
password: ${{ secrets.TOKEN }}
|
||
|
|
||
|
- name: Build and push Docker image
|
||
|
uses: docker/build-push-action@v5
|
||
|
with:
|
||
|
context: .
|
||
|
push: true
|
||
|
tags: ${{ secrets.REGISTRY }}/rannes.dev/sw-jobs-api:latest
|