This commit is contained in:
@@ -8,53 +8,52 @@ on:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
build-oci-image:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check for changes before building
|
||||
id: image-changes
|
||||
run: |
|
||||
echo "branch_name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITEA_OUTPUT
|
||||
if ! git diff ${{ gitea.event.before }} ${{ gitea.sha }} --no-patch --exit-code .docker; then
|
||||
echo changes_detected=true >> $GITEA_OUTPUT
|
||||
else
|
||||
echo changes_detected=false >> $GITEA_OUTPUT
|
||||
fi
|
||||
cat $GITEA_OUTPUT
|
||||
- name: Set up Docker buildx
|
||||
if: steps.image-changes.outputs.changes_detected == 'true'
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Github Container Registry
|
||||
if: steps.image-changes.outputs.changes_detected == 'true'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.epenguin.net
|
||||
username: ${{ vars.CI_BOT_USERNAME }}
|
||||
password: ${{ secrets.CI_BOT_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
if: steps.image-changes.outputs.changes_detected == 'true'
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
tags: git.epenguin.net/${{ gitea.repository }}:latest
|
||||
context: "{{defaultContext}}:.docker"
|
||||
|
||||
build:
|
||||
gentoo-utils:
|
||||
runs-on: brutalisk
|
||||
container:
|
||||
image: git.epenguin.net/gentoo-utils/gentoo-utils-gitea:latest
|
||||
needs: build-oci-image
|
||||
image: gentoo/stage3:latest
|
||||
continue-on-error: false
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v5
|
||||
- name: emerge-webrsync
|
||||
run: |
|
||||
getuto
|
||||
emerge-webrsync
|
||||
|
||||
- name: build and check
|
||||
run: ./check.sh
|
||||
- name: emerge git
|
||||
run: |
|
||||
emerge --getbinpkg dev-vcs/git
|
||||
|
||||
- name: checkout repo
|
||||
run: |
|
||||
git clone https://git.epenguin.net/gentoo-utils/gentoo-utils-gitea gentoo-utils
|
||||
cd gentoo-utils
|
||||
git checkout ${{ gitea.sha }}
|
||||
|
||||
- name: install gentoo config from repo
|
||||
working-directory: gentoo-utils
|
||||
run: |
|
||||
cp -rva .docker/etc/ /
|
||||
|
||||
- name: checkout spawns overlay
|
||||
run: |
|
||||
git clone https://jturnerusa.dev/cgit/ebuilds/ /var/db/repos/spawns
|
||||
|
||||
- name: mkdir for git-r3 eclass
|
||||
run: |
|
||||
mkdir -p /var/cache/distfiles/git3-src && chown portage:portage /var/cache/distfiles/git3-src
|
||||
|
||||
- name: emerge packages
|
||||
run: |
|
||||
emerge =dev-lang/rust-bin-9999 \
|
||||
=dev-build/meson-9999 \
|
||||
llvm-core/clang \
|
||||
llvm-core/lld \
|
||||
dev-vcs/git \
|
||||
sys-process/parallel \
|
||||
net-libs/nodejs
|
||||
|
||||
- name: run build and tests
|
||||
working-directory: gentoo-utils
|
||||
run: |
|
||||
./check.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user