All checks were successful
Build & Push Container Image / build (push) Successful in 15s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
786 B
YAML
28 lines
786 B
YAML
name: Build & Push Container Image
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
env:
|
|
REGISTRY: git.faralmail.com
|
|
IMAGE_PREFIX: faral
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Short SHA
|
|
run: echo "SHORT_SHA=$(echo $GITHUB_SHA | cut -c1-7)" >> "$GITHUB_ENV"
|
|
|
|
- name: Login to Forgejo Registry
|
|
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login $REGISTRY -u ${{ github.repository_owner }} --password-stdin
|
|
|
|
- name: Build and push
|
|
run: |
|
|
TAG="${REGISTRY}/${IMAGE_PREFIX}/pokerface"
|
|
docker build -t "${TAG}:${{ github.run_number }}-${SHORT_SHA}" -t "${TAG}:latest" .
|
|
docker push "${TAG}:${{ github.run_number }}-${SHORT_SHA}"
|
|
docker push "${TAG}:latest"
|