-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reintroduce base image monitoring and updating
- Loading branch information
1 parent
93e0156
commit 9e0de12
Showing
3 changed files
with
71 additions
and
35 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
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,20 @@ | ||
name: "Monitor .NET Base Images" | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * 0" # Check once a week on Sunday, at midnight | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # required to trigger repository_dispatch | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: mthalman/docker-bump-action@v0 | ||
with: | ||
base-image-name: 'mcr.microsoft.com/dotnet/aspnet:8.0' | ||
target-image-name: 'ghcr.io/lancemccarthy/aspirebase:8.0' |
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,43 @@ | ||
name: "Update Custom Base Images" | ||
on: | ||
workflow_dispatch: | ||
repository_dispatch: | ||
types: [base-image-update] | ||
|
||
env: | ||
CONTAINER_REGISTRY: "ghcr.io" | ||
BASE_IMAGE: "ghcr.io/lancemccarthy/aspirebase:8.0" | ||
APP_IMAGE_NAME: lancemccarthy/aspireapiservice | ||
APP_IMAGE_TAG: "8.0" | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
packages: write | ||
|
||
jobs: | ||
ghcr_custom_image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Login to ghcr.io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{env.CONTAINER_REGISTRY}} | ||
username: ${{github.actor}} | ||
password: ${{secrets.GITHUB_TOKEN}} | ||
|
||
# Build a custom base image with needed Linux dependencies preinstalled | ||
- name: Build Custom Image and push to GitHub packages | ||
working-directory: '.dockerbuilds/baseimage' | ||
id: build-and-publish | ||
run: | | ||
docker build -t "${{env.BASE_IMAGE}}" -f Dockerfile . | ||
docker push "${{env.BASE_IMAGE}}" |