Some checks failed
Gentoo Utils / build-oci-image (pull_request) Failing after 7s
66 lines
2.1 KiB
YAML
66 lines
2.1 KiB
YAML
name: Gentoo Utils
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
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 "${GITEA_HEAD_REF:-${GITEA_REF#refs/heads/}}"
|
|
echo "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
|
|
echo "branch_name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITEA_OUTPUT
|
|
echo "default_branch_name=${{ gitea.event.repository.default_branch }}" >> $GITEA_OUTPUT
|
|
if ! git diff ${{ gitea.event.before }} ${{ gitea.sha }} --no-patch --exit-code .docker; then
|
|
if git diff ${{ gitea.event.before }} ${{ gitea.sha }} --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
|
|
# container:
|
|
# image: git.epenguin.net/gentoo-utils/gentoo-utils-gitea:latest
|
|
# needs: build-oci-image
|
|
# steps:
|
|
# - name: Checkout repo
|
|
# uses: actions/checkout@v5
|
|
|
|
# - name: build and check
|
|
# run: ./check.sh
|