Publish Container / publish (push) Successful in 2m41s
Moves workflow to .gitea/workflows/ and updates container registry from ghcr.io to git.necloud.us using REGISTRY_USER/REGISTRY_TOKEN secrets. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
44 lines
1023 B
YAML
44 lines
1023 B
YAML
name: Publish Container
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to Gitea Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.necloud.us
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Extract image metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: git.necloud.us/nate/weather
|
|
tags: |
|
|
type=raw,value=latest
|
|
type=sha
|
|
|
|
- name: Build and push image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./app
|
|
file: ./app/Dockerfile
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|