All checks were successful
Build and Push / build_and_push (push) Successful in 2m31s
37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
name: Build and Push
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build_and_push:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set Variables
|
|
run: |
|
|
echo "REGISTRY_ADDRESS=$(echo ${{ github.SERVER_URL }} | sed 's/^https\?:\/\///')" >> $GITHUB_ENV
|
|
echo "REPOSITORY_ADDRESS=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY_ADDRESS }}
|
|
username: ${{ github.REPOSITORY_OWNER }}
|
|
password: ${{ secrets.PACKAGE_TOKEN }}
|
|
|
|
- name: Build and push Image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: |
|
|
${{ env.REGISTRY_ADDRESS }}/${{ env.REPOSITORY_ADDRESS }}:${{ github.sha }}
|
|
${{ env.REGISTRY_ADDRESS }}/${{ env.REPOSITORY_ADDRESS }}:latest |