testing a thing
This commit is contained in:
@@ -1,16 +0,0 @@
|
|||||||
name: Build gentoo-utils
|
|
||||||
on: [pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: gentoo-utils
|
|
||||||
needs: build-docker
|
|
||||||
if: ${{ always() }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v5
|
|
||||||
|
|
||||||
- name: build and check
|
|
||||||
run: ./check.sh
|
|
||||||
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
name: Build gentoo-utils docker image
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
paths:
|
|
||||||
- '.docker/Dockerfile'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '.docker/Dockerfile'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-docker:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout repo
|
|
||||||
uses: actions/checkout@v5
|
|
||||||
|
|
||||||
-
|
|
||||||
name: Set up Docker buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
-
|
|
||||||
name: Log in to Github Container Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: git.epenguin.net
|
|
||||||
username: ${{ vars.CI_BOT_USERNAME }}
|
|
||||||
password: ${{ secrets.CI_BOT_TOKEN }}
|
|
||||||
|
|
||||||
-
|
|
||||||
name: Build and push
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
push: true
|
|
||||||
tags: git.epenguin.net/${{ gitea.repository }}:latest
|
|
||||||
context: "{{defaultContext}}:.docker"
|
|
||||||
58
.gitea/workflows/gentoo-utils.yml
Normal file
58
.gitea/workflows/gentoo-utils.yml
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
name: Gentoo Utils
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
pull_request:
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-docker:
|
||||||
|
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: |
|
||||||
|
if git diff --name-only ${{ gitea.event.before }} ${{ gitea.sha }} | grep -q '^\.docker/'; then
|
||||||
|
echo "changes_detected=true" >> $GITEA_OUTPUT
|
||||||
|
else
|
||||||
|
echo "changes_detected=false" >> $GITEA_OUTPUT
|
||||||
|
fi
|
||||||
|
-
|
||||||
|
name: Set up Docker buildx
|
||||||
|
if: steps.docker-changes.outputs.changes_detected == 'true'
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
-
|
||||||
|
name: Log in to Github Container Registry
|
||||||
|
if: steps.docker-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.docker-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: gentoo-utils
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: build and check
|
||||||
|
run: ./check.sh
|
||||||
Reference in New Issue
Block a user