b3f59780f2
Publish Docker image / build-and-push (push) Failing after 9s
Gitea rejects variable/secret names starting with GITEA_ or GITHUB_ (reserved for system-injected values), which is why GITEA_REGISTRY couldn't be created in repo settings.
35 lines
809 B
YAML
35 lines
809 B
YAML
name: Publish Docker image
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
tags: ['v*']
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to Gitea container registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ vars.REGISTRY_HOST }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: |
|
|
${{ vars.REGISTRY_HOST }}/${{ github.repository }}:latest
|
|
${{ vars.REGISTRY_HOST }}/${{ github.repository }}:${{ github.sha }}
|