- Use gitea.actor instead of github.actor - Use REGISTRY_TOKEN secret - Use direct docker build/push commands - Hardcode image name Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
28 lines
766 B
YAML
28 lines
766 B
YAML
name: Build and Push Container
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
REGISTRY: gitea.anvil.it.com
|
|
IMAGE: kaffa/vultr-api
|
|
|
|
jobs:
|
|
build-amd64:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Login to Registry
|
|
run: docker login ${{ env.REGISTRY }} -u ${{ gitea.actor }} -p ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Build and Push AMD64
|
|
run: |
|
|
docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE }}:amd64 -f server/Dockerfile .
|
|
docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:amd64
|
|
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE }}:amd64 ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest
|
|
docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest
|