Skip to content

Commit 89f8ba0

Browse files
authored
Merge pull request #1 from joshraphael/preload-image
Preload image
2 parents 07bca43 + 1dd2bd2 commit 89f8ba0

File tree

1 file changed

+15
-21
lines changed

1 file changed

+15
-21
lines changed

action.yml

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ description: Compiles an RAScript for RetroAchievements development and performs
33
author: joshraphael
44

55
inputs:
6+
id:
7+
description: "Unique identifier to prepend on the output file"
8+
type: string
9+
required: true
610
game-id:
711
description: "RetroAchievements game id"
812
type: number
@@ -33,33 +37,23 @@ runs:
3337
steps:
3438
- name: Checkout repo
3539
uses: actions/checkout@v4
40+
- name: pull image
41+
if: ${{ 1 == 0 }} # this is a hack to pre-fetch the docker image to reduce the logs in the actual action
42+
uses: docker://ghcr.io/joshraphael/rascript-audit-img:v0.0.4
3643
- name: Run rascript-audit
3744
shell: bash
3845
run: |
46+
docker container rm -f rascript-audit-img
3947
mkdir -p container_home
40-
docker run --name rascript-audit-img -e GAME_ID=${{ inputs.game-id }} -e RASCRIPT_FILE="${{ inputs.rascript }}" -e REPORT=${{ inputs.report }} -e SEVERITY=${{ inputs.severity }} --mount type=bind,src=.,dst=/app/rascript -i ghcr.io/joshraphael/rascript-audit-img:v0.0.3
48+
docker run --name rascript-audit-img -e GAME_ID=${{ inputs.game-id }} -e RASCRIPT_FILE="${{ inputs.rascript }}" -e REPORT=${{ inputs.report }} -e SEVERITY=${{ inputs.severity }} --mount type=bind,src=.,dst=/app/rascript -i --entrypoint=/app/entry.sh ghcr.io/joshraphael/rascript-audit-img:v0.0.4
4149
export CONTAINER_ID=$(docker ps -a --filter name=${{ inputs.name }} -q)
4250
docker cp $CONTAINER_ID:/app/home.txt container_home/
4351
docker cp $CONTAINER_ID:/app/copy.sh container_home/
44-
GAME_ID=${{ inputs.game-id }} bash container_home/copy.sh
45-
- name: Upload Achievement and Leaderboard Code
46-
uses: actions/upload-artifact@v4
47-
with:
48-
name: ${{ github.run_id }}-${{ inputs.game-id }}-user-text
49-
path: container_home/${{ inputs.game-id }}-User.txt
50-
- name: Upload Code Notes
51-
uses: actions/upload-artifact@v4
52-
with:
53-
name: ${{ github.run_id }}-${{ inputs.game-id }}-notes-json
54-
path: container_home/${{ inputs.game-id }}-Notes.json
55-
- name: Upload Rich Presence
56-
uses: actions/upload-artifact@v4
57-
with:
58-
name: ${{ github.run_id }}-${{ inputs.game-id }}-rich-text
59-
path: container_home/${{ inputs.game-id }}-Rich.txt
60-
- name: Upload Report
52+
GAME_ID=${{ inputs.game-id }} REPORT=${{ inputs.report }} bash container_home/copy.sh
53+
rm -rf container_home/home.txt
54+
rm -rf container_home/copy.sh
55+
- name: Upload Audit
6156
uses: actions/upload-artifact@v4
62-
if: ${{ inputs.report == 'true' }}
6357
with:
64-
name: ${{ github.run_id }}-${{ inputs.game-id }}-report-text
65-
path: container_home/${{ inputs.game-id }}-Report.txt
58+
name: ${{ inputs.id }}-${{ inputs.game-id }}-audit
59+
path: container_home/

0 commit comments

Comments
 (0)