generated from archlinux/template
Add up-to-date check to not recompile things that have not changed
This commit is contained in:
@@ -37,12 +37,37 @@ jobs:
|
||||
run: |
|
||||
curl https://idlesleep.wolproxy.seeseepuff.be/status
|
||||
|
||||
check:
|
||||
name: Check if rebuild is necessary
|
||||
runs-on: ubuntu-amd64
|
||||
needs: wake
|
||||
outputs:
|
||||
up-to-date: ${{ steps.up-to-date.outputs.up-to-date }}
|
||||
container:
|
||||
image: gitea.seeseepuff.be/archlinux/archlinux:latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Ensure image is up-to-date
|
||||
run: |
|
||||
sudo pacman -Sy --noconfirm
|
||||
|
||||
- name: Check if rebuild is necessary
|
||||
id: up-to-date
|
||||
run: |
|
||||
set +e
|
||||
.gitea/workflows/up-to-date.sh
|
||||
echo "exit_code=$?" >> "$GITHUB_OUTPUT"
|
||||
set -e
|
||||
|
||||
build:
|
||||
name: Build and Push
|
||||
runs-on: ubuntu-amd64
|
||||
needs: wake
|
||||
needs: check
|
||||
container:
|
||||
image: gitea.seeseepuff.be/archlinux/archlinux:latest
|
||||
if: needs.check.outputs.up-to-date == '1'
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
@@ -50,6 +75,10 @@ jobs:
|
||||
- name: Ensure image is up-to-date
|
||||
run: |
|
||||
sudo pacman -Syu --noconfirm
|
||||
|
||||
- name: Check if rebuild is necessary
|
||||
run: |
|
||||
.gitea/workflows/up-to-date.sh
|
||||
|
||||
- name: Build package
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user