This commit is contained in:
23
.gitea/workflows/build-and-push.yaml
Normal file
23
.gitea/workflows/build-and-push.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Build and Push Docker Image (Simple)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: runner
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build and push
|
||||
run: |
|
||||
# Login to Gitea registry
|
||||
echo "${{ secrets.GITEATOKEN }}" | docker login ${{ gitea.server_url }} -u ${{ gitea.actor }} --password-stdin
|
||||
|
||||
# Build the image
|
||||
docker build -t ${{ gitea.server_url }}/${{ gitea.repository_owner }}/hello-gitea:latest .
|
||||
|
||||
# Push to registry
|
||||
docker push ${{ gitea.server_url }}/${{ gitea.repository_owner }}/hello-gitea:latest
|
||||
Reference in New Issue
Block a user