-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from rlabinc/main
Combine "latest" & "dev" folders
- Loading branch information
Showing
19 changed files
with
18 additions
and
560 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
name: Dev Build & Push | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 3 * * *' | ||
|
||
|
@@ -20,7 +21,7 @@ jobs: | |
id: base_update_check | ||
run: | | ||
BASE_IMAGE_DIGEST=$(curl -s https://registry.hub.docker.com/v2/repositories/pihole/pihole/tags/dev | grep -oP '"digest":"\K[^"]+' | tail -1) | ||
PREVIOUS_DIGEST=$(cat ./dev/Base_Digest) | ||
PREVIOUS_DIGEST=$(cat ./Dev_Base_Digest) | ||
if [ "$BASE_IMAGE_DIGEST" == "$PREVIOUS_DIGEST" ]; then | ||
echo "Base image has not been updated. Exiting..." | ||
echo "build_image=false" >> $GITHUB_OUTPUT | ||
|
@@ -36,7 +37,6 @@ jobs: | |
steps: | ||
- | ||
name: Checkout | ||
if: github.event_name == 'schedule' | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
|
@@ -67,8 +67,9 @@ jobs: | |
name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ./dev/ | ||
context: ./ | ||
platforms: linux/amd64, linux/arm64, linux/arm/v7, linux/arm/v6 | ||
build-args: BASE_IMG_TAG=dev | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
@@ -82,7 +83,7 @@ jobs: | |
run: | | ||
BASE_IMAGE_DIGEST=$(curl -s https://registry.hub.docker.com/v2/repositories/pihole/pihole/tags/dev | grep -oP '"digest":"\K[^"]+' | tail -1) | ||
echo "New Digest: $BASE_IMAGE_DIGEST" | ||
echo $BASE_IMAGE_DIGEST > ./dev/Base_Digest | ||
echo $BASE_IMAGE_DIGEST > ./Dev_Base_Digest | ||
- | ||
name: Push changes to repository | ||
env: | ||
|
@@ -94,6 +95,6 @@ jobs: | |
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
git remote set-url origin https://${{ secrets.GITHUB_TOKEN }}@github.com/origamiofficial/docker-pihole-unbound.git | ||
git add ./dev/Base_Digest | ||
git add ./Dev_Base_Digest | ||
git commit -m "Base Digest Updated" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ jobs: | |
id: base_update_check | ||
run: | | ||
BASE_IMAGE_DIGEST=$(curl -s https://registry.hub.docker.com/v2/repositories/pihole/pihole/tags/latest | grep -oP '"digest":"\K[^"]+' | tail -1) | ||
PREVIOUS_DIGEST=$(cat ./latest/Base_Digest) | ||
PREVIOUS_DIGEST=$(cat ./Latest_Base_Digest) | ||
if [ "$BASE_IMAGE_DIGEST" == "$PREVIOUS_DIGEST" ]; then | ||
echo "Base image has not been updated. Exiting..." | ||
echo "build_image=false" >> $GITHUB_OUTPUT | ||
|
@@ -36,7 +36,6 @@ jobs: | |
steps: | ||
- | ||
name: Checkout | ||
if: github.event_name == 'schedule' | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
|
@@ -67,8 +66,9 @@ jobs: | |
name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ./latest/ | ||
context: ./ | ||
platforms: linux/amd64, linux/arm64, linux/arm/v7, linux/arm/v6 | ||
build-args: BASE_IMG_TAG=latest | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
@@ -82,7 +82,7 @@ jobs: | |
run: | | ||
BASE_IMAGE_DIGEST=$(curl -s https://registry.hub.docker.com/v2/repositories/pihole/pihole/tags/latest | grep -oP '"digest":"\K[^"]+' | tail -1) | ||
echo "New Digest: $BASE_IMAGE_DIGEST" | ||
echo $BASE_IMAGE_DIGEST > ./latest/Base_Digest | ||
echo $BASE_IMAGE_DIGEST > ./Latest_Base_Digest | ||
- | ||
name: Push changes to repository | ||
env: | ||
|
@@ -94,6 +94,6 @@ jobs: | |
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
git remote set-url origin https://${{ secrets.GITHUB_TOKEN }}@github.com/origamiofficial/docker-pihole-unbound.git | ||
git add ./latest/Base_Digest | ||
git add ./Latest_Base_Digest | ||
git commit -m "Base Digest Updated" | ||
git push |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TEST-DEV-BASE-DIGEST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.