-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.build.yml
66 lines (54 loc) · 2.1 KB
/
.build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# SPDX-FileCopyrightText: 2024 Dominik Wombacher <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0
# builds.sr.ht - Build manifest
# https://man.sr.ht/builds.sr.ht/manifest.md
image: archlinux
packages:
- podman
- helm
sources:
- https://git.sr.ht/~wombelix/fluent-bit-output-plugin-aws-cloudtrail-data
- https://git.sr.ht/~wombelix/build-helper-scripts
secrets:
- f7847d8d-f3db-49d9-b4ce-d438a47db5ee
- 5b076ab5-1361-4d71-905b-4ff8c836c62c
environment:
GIT_MIRROR_SSH_KEY: ~/.ssh/5b076ab5-1361-4d71-905b-4ff8c836c62c
GIT_MIRROR_GITHUB: [email protected]:wombelix/fluent-bit-output-plugin-aws-cloudtrail-data.git
GIT_MIRROR_GITLAB: [email protected]:wombelix/fluent-bit-output-plugin-aws-cloudtrail-data.git
GIT_MIRROR_CODEBERG: [email protected]:wombelix/fluent-bit-output-plugin-aws-cloudtrail-data.git
tasks:
- mirror: |
cd build-helper-scripts
source git-mirror.sh
cd ..
cd fluent-bit-output-plugin-aws-cloudtrail-data
git_mirror "$GIT_MIRROR_SSH_KEY" "$GIT_MIRROR_GITHUB"
git_mirror "$GIT_MIRROR_SSH_KEY" "$GIT_MIRROR_GITLAB"
git_mirror "$GIT_MIRROR_SSH_KEY" "$GIT_MIRROR_CODEBERG"
- container: |
cd fluent-bit-output-plugin-aws-cloudtrail-data/container
set +x
podman login --authfile $HOME/.docker/config.json quay.io
set -x
QUAY_REPO=quay.io/wombelix/fluent-bit-aws-cloudtrail-data
GIT_SHA=$(git rev-parse --short HEAD)
podman build -t ${QUAY_REPO}:${GIT_SHA} .
podman push ${QUAY_REPO}:${GIT_SHA}
GIT_BRANCH=$(git branch --points-at=${GIT_SHA} | tail -n1 | tr -d '* ')
if [ "${GIT_BRANCH}" = "main" ]; then
podman tag ${QUAY_REPO}:${GIT_SHA} ${QUAY_REPO}:main
podman push ${QUAY_REPO}:main
fi
GIT_TAG=$(git tag --points-at=${GIT_SHA})
if [ -n "${GIT_TAG}" ]; then
podman tag ${QUAY_REPO}:${GIT_SHA} ${QUAY_REPO}:${GIT_TAG}
podman push ${QUAY_REPO}:${GIT_TAG}
podman tag ${QUAY_REPO}:${GIT_SHA} ${QUAY_REPO}:latest
podman push ${QUAY_REPO}:latest
fi
triggers:
- action: email
condition: failure