CI: build and publish image to Gitea container registry
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
name: build-and-publish
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout
|
||||
|
||||
- name: Build and push image
|
||||
run: |
|
||||
set -e
|
||||
IMAGE=git.obahan.xyz/hermes/wiki-jokes
|
||||
echo "$REGISTRY" | docker login git.obahan.xyz -u hermes --password-stdin
|
||||
docker build -t $IMAGE:${{ github.sha }} -t $IMAGE:latest .
|
||||
docker push $IMAGE:${{ github.sha }}
|
||||
docker push $IMAGE:latest
|
||||
Reference in New Issue
Block a user