Skip to content

Commit

Permalink
use image tag
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonN3 committed Feb 26, 2024
1 parent 8f9f0bf commit 9fb7788
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ jobs:
with:
string: ${{ env.IMAGE_REPO }}

- name: Get image version
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
- name: Build ISO
uses: ./
with:
Expand All @@ -79,6 +89,7 @@ jobs:
image_repo: ${{ env.IMAGE_REPO}}
version: ${{ env.VERSION }}
variant: ${{ env.VARIANT }}
action_version: ${{ steps.meta.outputs.tags }}

- name: Rename ISO
run: |
Expand Down
7 changes: 5 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,18 @@ inputs:
description: Enable Anaconda WebUI
required: false
default: "false"
action_version:
description: Version of the action container to run
required: true
default: "latest"

runs:
using: composite
steps:
- name: Run docker image
shell: bash
run: |
tag=$( echo ${{ github.ref_name }} | tr '/' ' ' | awk '{ print $1 }' )
docker run --privileged --volume .:/github/workspace/ ghcr.io/jasonn3/build-container-image:${tag} \
docker run --privileged --volume .:/github/workspace/ ghcr.io/jasonn3/build-container-image:${{ inputs.action_version }} \
ARCH=${{ inputs.arch }} \
IMAGE_NAME=${{ inputs.image_name }} \
IMAGE_REPO=${{ inputs.image_repo }} \
Expand Down

0 comments on commit 9fb7788

Please sign in to comment.