mirror of
https://github.com/getnora-io/nora.git
synced 2026-04-12 15:00:31 +00:00
Add Dockerfile.astra (astralinux/alse) and Dockerfile.redos (redos/redos) for FSTEC-certified Russian OS targets. Update release.yml with a matrix strategy that produces three image variants per release: - ghcr.io/.../nora:0.x.x (Alpine, default) - ghcr.io/.../nora:0.x.x-astra (Astra Linux SE) - ghcr.io/.../nora:0.x.x-redos (RED OS) Build stage is shared (musl static binary) across all variants.
106 lines
2.7 KiB
YAML
106 lines
2.7 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags: ['v*']
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
|
|
jobs:
|
|
build:
|
|
name: Build & Push (${{ matrix.name }})
|
|
runs-on: self-hosted
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: alpine
|
|
dockerfile: Dockerfile
|
|
suffix: ""
|
|
- name: astra
|
|
dockerfile: Dockerfile.astra
|
|
suffix: "-astra"
|
|
- name: redos
|
|
dockerfile: Dockerfile.redos
|
|
suffix: "-redos"
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Extract metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
flavor: |
|
|
suffix=${{ matrix.suffix }},onlatest=true
|
|
tags: |
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
type=raw,value=latest,enable=${{ matrix.suffix == '' }}
|
|
type=raw,value=${{ matrix.name }},enable=${{ matrix.suffix != '' }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ${{ matrix.dockerfile }}
|
|
platforms: linux/amd64
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
cache-from: type=gha,scope=${{ matrix.name }}
|
|
cache-to: type=gha,mode=max,scope=${{ matrix.name }}
|
|
|
|
release:
|
|
name: GitHub Release
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
generate_release_notes: true
|
|
body: |
|
|
## Docker
|
|
|
|
**Alpine (standard):**
|
|
```bash
|
|
docker pull ghcr.io/${{ github.repository }}:${{ github.ref_name }}
|
|
```
|
|
|
|
**Astra Linux SE:**
|
|
```bash
|
|
docker pull ghcr.io/${{ github.repository }}:${{ github.ref_name }}-astra
|
|
```
|
|
|
|
**RED OS:**
|
|
```bash
|
|
docker pull ghcr.io/${{ github.repository }}:${{ github.ref_name }}-redos
|
|
```
|
|
|
|
## Changelog
|
|
|
|
See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md)
|