45 lines
No EOL
1.2 KiB
YAML
45 lines
No EOL
1.2 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
env:
|
|
REGISTRY: ${{ github.api_url != 'https://api.github.com' && 'git.froth.zone' || 'ghcr.io' }}
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- id: lowercase
|
|
run: |
|
|
echo REGISTRY=$(echo $REGISTRY | tr '[:upper:]' '[:lower:]') >> "${GITHUB_ENV}"
|
|
- id: lowercase-2
|
|
run: |
|
|
echo IMAGE_NAME=$(echo $IMAGE_NAME | tr '[:upper:]' '[:lower:]') >> "${GITHUB_ENV}"
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Login to Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64
|
|
push: true
|
|
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest |