31 lines
874 B
YAML
31 lines
874 B
YAML
name: Publish to OCI Registry
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- gold
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set repository name to lowercase
|
|
run: echo "REPO_NAME=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Authenticate with registry
|
|
run: docker login git.smgames.club -u ${{ github.repository_owner }} -p ${{ secrets.DOCKER_TOKEN }}
|
|
|
|
- name: Build and push multi-architecture Docker image
|
|
run: |
|
|
docker buildx create --use
|
|
docker buildx build \
|
|
--platform linux/amd64,linux/arm64 \
|
|
--tag git.smgames.club/${{ env.REPO_NAME }}:latest \
|
|
--push \
|
|
.
|