change line endings (and url for mlugg/setup-zig)
Some checks failed
Generic zig build / build (push) Failing after 14m17s
Some checks failed
Generic zig build / build (push) Failing after 14m17s
This commit is contained in:
parent
171dd2e96e
commit
d0954e7f02
1 changed files with 72 additions and 72 deletions
|
@ -1,72 +1,72 @@
|
||||||
name: Generic zig build
|
name: Generic zig build
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- '*'
|
- '*'
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: mlugg/setup-zig@v1.2.1
|
- uses: https://github.com/mlugg/setup-zig@v1.2.1
|
||||||
with:
|
with:
|
||||||
version: 0.14.0
|
version: 0.14.0
|
||||||
- uses: https://github.com/elerch/zig-action-cache@v1.1.6
|
- uses: https://github.com/elerch/zig-action-cache@v1.1.6
|
||||||
- name: Build project
|
- name: Build project
|
||||||
run: zig build --summary all
|
run: zig build --summary all
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: zig build test --summary all
|
run: zig build test --summary all
|
||||||
- name: Run tests (release mode)
|
- name: Run tests (release mode)
|
||||||
run: zig build -Doptimize=ReleaseSafe -Dtarget=x86_64-linux test --summary all
|
run: zig build -Doptimize=ReleaseSafe -Dtarget=x86_64-linux test --summary all
|
||||||
- name: Package for release
|
- name: Package for release
|
||||||
run: zig build -Doptimize=ReleaseSafe -Dtarget=x86_64-linux
|
run: zig build -Doptimize=ReleaseSafe -Dtarget=x86_64-linux
|
||||||
- name: Publish build
|
- name: Publish build
|
||||||
run: |
|
run: |
|
||||||
curl --user ${{ github.actor }}:${{ secrets.PACKAGE_PUSH }} \
|
curl --user ${{ github.actor }}:${{ secrets.PACKAGE_PUSH }} \
|
||||||
--upload-file zig-out/bin/syncthing_events \
|
--upload-file zig-out/bin/syncthing_events \
|
||||||
https://git.lerch.org/api/packages/lobo/generic/aws-sdk-with-models/${{ github.sha }}/syncthing_events-x86_64-linux-${{ github.sha }}
|
https://git.lerch.org/api/packages/lobo/generic/aws-sdk-with-models/${{ github.sha }}/syncthing_events-x86_64-linux-${{ github.sha }}
|
||||||
- name: Prepare docker image
|
- name: Prepare docker image
|
||||||
run: zig build docker
|
run: zig build docker
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
# list of Docker images to use as base name for tags
|
# list of Docker images to use as base name for tags
|
||||||
images: |
|
images: |
|
||||||
git.lerch.org/&{{ github.repository }}
|
git.lerch.org/&{{ github.repository }}
|
||||||
# generate Docker tags based on the following events/attributes
|
# generate Docker tags based on the following events/attributes
|
||||||
tags: |
|
tags: |
|
||||||
type=schedule
|
type=schedule
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
type=ref,event=pr
|
type=ref,event=pr
|
||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{version}}
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
type=semver,pattern={{major}}
|
type=semver,pattern={{major}}
|
||||||
type=sha
|
type=sha
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
- name: Log in to Gitea Container Registry
|
- name: Log in to Gitea Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: git.lerch.org
|
registry: git.lerch.org
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.PACKAGE_PUSH }}
|
password: ${{ secrets.PACKAGE_PUSH }}
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: zig-out
|
context: zig-out
|
||||||
platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6
|
platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6
|
||||||
# load: true # will not work for multiplatform
|
# load: true # will not work for multiplatform
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
annotations: ${{ steps.meta.outputs.annotations }}
|
annotations: ${{ steps.meta.outputs.annotations }}
|
||||||
- name: Notify
|
- name: Notify
|
||||||
uses: https://github.com/elerch/action-notify-ntfy@v2.github
|
uses: https://github.com/elerch/action-notify-ntfy@v2.github
|
||||||
if: always() && env.GITEA_ACTIONS == 'true'
|
if: always() && env.GITEA_ACTIONS == 'true'
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.NTFY_HOST }}
|
host: ${{ secrets.NTFY_HOST }}
|
||||||
topic: ${{ secrets.NTFY_TOPIC }}
|
topic: ${{ secrets.NTFY_TOPIC }}
|
||||||
status: ${{ job.status }}
|
status: ${{ job.status }}
|
||||||
user: ${{ secrets.NTFY_USER }}
|
user: ${{ secrets.NTFY_USER }}
|
||||||
password: ${{ secrets.NTFY_PASSWORD }}
|
password: ${{ secrets.NTFY_PASSWORD }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue