This commit is contained in:
@@ -8,53 +8,52 @@ on:
|
|||||||
branches: [master]
|
branches: [master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-oci-image:
|
gentoo-utils:
|
||||||
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:
|
|
||||||
runs-on: brutalisk
|
runs-on: brutalisk
|
||||||
container:
|
container:
|
||||||
image: git.epenguin.net/gentoo-utils/gentoo-utils-gitea:latest
|
image: gentoo/stage3:latest
|
||||||
needs: build-oci-image
|
continue-on-error: false
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: emerge-webrsync
|
||||||
uses: actions/checkout@v5
|
run: |
|
||||||
|
getuto
|
||||||
|
emerge-webrsync
|
||||||
|
|
||||||
- name: build and check
|
- name: emerge git
|
||||||
run: ./check.sh
|
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