All checks were successful
continuous-integration/drone/push Build is passing
- and build and push step using drone plugin
31 lines
769 B
YAML
31 lines
769 B
YAML
name: Build and Push Docker Image to Gitea Registry
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
branch:
|
|
- main
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Login to Gitea Registry
|
|
run: |
|
|
echo "${{ secrets.TOKEN }}" | docker login ${{ gitea.server_url }} --username ${{ gitea.actor }} --password-stdin
|
|
|
|
- name: Test workflow
|
|
run: |
|
|
echo "Image pushed: ${{ gitea.server_url }}/${{ gitea.repository }}:${{ gitea.sha }}"
|
|
echo "Image pushed: ${{ gitea.server_url }}/${{ gitea.repository }}:latest" |