Skip to content

Commit

Permalink
use the new image to prove it works
Browse files Browse the repository at this point in the history
  • Loading branch information
baronfel committed May 8, 2024
1 parent cfe38c5 commit 0e9ad61
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/custom-base-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
env:
GITHUB_USERNAME: baronfel
BASE_IMAGE: "ghcr.io/baronfel/dotnet-runtime-skia-base-image:8.0"
IMAGE_NAME: baronfel/skia-app:8.0

jobs:
create-base-image:
Expand Down Expand Up @@ -36,7 +37,6 @@ jobs:
permissions:
contents: read
packages: write

runs-on: ubuntu-latest
steps:
- name: Login to ghcr.io
Expand All @@ -52,7 +52,26 @@ jobs:
- name: Get the code
uses: actions/checkout@v2

- name: Build the app
- name: Build and publish the app
working-directory: src/custom-base-image
run: |
dotnet publish -t:PublishContainer -p ContainerBaseImage="${{ env.BASE_IMAGE }}"
dotnet publish -t:PublishContainer -p ContainerBaseImage="${{ env.BASE_IMAGE }}" -p ContainerRepository="${{ env.IMAGE_NAME}}" -p ContainerRegistry=ghcr.io
run-the-image:
needs: use-base-image
permissions:
contents: read
packages: write
runs-on: ubuntu-latest

steps:
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Execute the container
run: |
docker run --pull --rm ghcr.io/${{ env.IMAGE_NAME }}

0 comments on commit 0e9ad61

Please sign in to comment.