This repository has been archived by the owner on Jan 12, 2025. It is now read-only.
Multiple changes #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 1' | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | podman login ghcr.io -u "${{ github.actor }}" --password-stdin | |
- name: Build Alpine container | |
run: podman build -t ghcr.io/charles8191/hardened_malloc/artifact:alpine -f Containerfile.alpine | |
- name: Build Debian container | |
run: podman build -t ghcr.io/charles8191/hardened_malloc/artifact:debian -f Containerfile.debian | |
- name: Build RHEL container | |
run: podman build -t ghcr.io/charles8191/hardened_malloc/artifact:rhel -f Containerfile.rhel | |
- name: Build binary using Alpine | |
run: | | |
set -ex | |
mkdir out-alpine | |
podman run -v ./out-alpine:/out ghcr.io/charles8191/hardened_malloc/artifact:alpine | |
- name: Build binary using Debian | |
run: | | |
set -euxo pipefail | |
mkdir out-debian | |
podman run -v ./out-debian:/out ghcr.io/charles8191/hardened_malloc/artifact:debian | |
- name: Build binary using RHEL | |
run: | | |
set -euxo pipefail | |
mkdir out-rhel | |
podman run -v ./out-rhel:/out ghcr.io/charles8191/hardened_malloc/artifact:debian | |
- name: Push binaries | |
run: | | |
set -euxo pipefail | |
cp -vf out-alpine/libhardened_malloc.so libhardened_malloc-alpine.so | |
cp -vf out-debian/libhardened_malloc.so libhardened_malloc-debian.so | |
cp -vf out-rhel/libhardened_malloc.so libhardened_malloc-rhel.so | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add libhardened_malloc-{alpine,debian,rhel}.so | |
git commit --allow-empty -m "[AUTOMATED] Upload binaries" | |
git push | |
- name: Push Alpine container | |
run: podman push ghcr.io/charles8191/hardened_malloc/artifact:alpine | |
- name: Push Debian container | |
run: podman push ghcr.io/charles8191/hardened_malloc/artifact:debian | |
- name: Push RHEL container | |
run: podman push ghcr.io/charles8191/hardened_malloc/artifact:rhel |