49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
|
name: Release - Tag and publish Docker image
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches: [ main ]
|
||
|
|
||
|
jobs:
|
||
|
create_release:
|
||
|
runs-on: ubuntu-latest
|
||
|
permissions:
|
||
|
contents: write
|
||
|
packages: write
|
||
|
steps:
|
||
|
- name: Checkout
|
||
|
uses: actions/checkout@v4
|
||
|
|
||
|
- name: Prepare
|
||
|
env:
|
||
|
DONATE_PAGE_DATA: ${{ vars.DONATE_PAGE_DATA }}
|
||
|
run: |
|
||
|
echo "$DONATE_PAGE_DATA" > src/components/pages/PageDonate/data.json
|
||
|
|
||
|
- name: Set up QEMU
|
||
|
uses: docker/setup-qemu-action@v2
|
||
|
- name: Set up Docker Buildx
|
||
|
uses: docker/setup-buildx-action@v3
|
||
|
|
||
|
- name: Login to GitHub Container Registry
|
||
|
uses: docker/login-action@v3
|
||
|
with:
|
||
|
registry: ghcr.io
|
||
|
username: ${{ github.actor }}
|
||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||
|
|
||
|
- name: Docker meta
|
||
|
id: meta
|
||
|
uses: docker/metadata-action@v5
|
||
|
with:
|
||
|
images: ghcr.io/teidesu/tei.su
|
||
|
tags: type=sha
|
||
|
flavor: latest=true
|
||
|
- name: Build and push
|
||
|
uses: docker/build-push-action@v5
|
||
|
with:
|
||
|
context: .
|
||
|
push: true
|
||
|
platforms: linux/amd64,linux/arm64
|
||
|
tags: ${{ steps.meta.outputs.tags }}
|
||
|
labels: ${{ steps.meta.outputs.labels }}
|