diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 9274703..651be87 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -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: @@ -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: | diff --git a/action.yml b/action.yml index 352f643..df33b2b 100644 --- a/action.yml +++ b/action.yml @@ -29,6 +29,10 @@ 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 @@ -36,8 +40,7 @@ runs: - 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 }} \