Skip to content

Create artifacts

Create artifacts #20

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: Create artifacts
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
permissions:
contents: read
jobs:
create-linux-artifacts:
name: Create Linux artifacts
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image
shell: bash
run: |
docker build --load --tag "fediproto-sync:latest" --platform "linux/amd64,linux/arm64" --file "./Dockerfile.artifacts" .;
mkdir -p ${{ github.workspace }}/artifacts;
docker run --volume "./artifacts:/artifacts" --platform "linux/amd64" --rm "fediproto-sync:latest" -- bash -c "cp -r /tmp/fediproto-sync/** /artifacts";
docker run --volume "./artifacts:/artifacts" --platform "linux/arm64" --rm "fediproto-sync:latest" -- bash -c "cp -r /tmp/fediproto-sync/** /artifacts";
- name: Create artifact (Linux - x64)
uses: actions/upload-artifact@v4
with:
name: "fediproto-sync_linux-amd64_${{ github.ref_type == 'tag' && github.ref_name || github.sha }}"
path: ${{ github.workspace }}/artifacts/linux_amd64/**/*
if-no-files-found: error
- name: Create artifact (Linux - arm64)
uses: actions/upload-artifact@v4
with:
name: "fediproto-sync_linux-arm64_${{ github.ref_type == 'tag' && github.ref_name || github.sha }}"
path: ${{ github.workspace }}/artifacts/linux_arm64/**/*
if-no-files-found: error