Skip to content

Commit 3f407ae

Browse files
committed
Move Docker image to GHCR
1 parent ebe7bf9 commit 3f407ae

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

.github/workflows/push-image.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Push image to container registry
2+
on:
3+
- push
4+
5+
jobs:
6+
docker_publish:
7+
runs-on: "ubuntu-20.04"
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v2
11+
- name: Compute short commit sha
12+
id: compute-sha
13+
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
14+
- name: Build and publish Docker image
15+
uses: macbre/push-to-ghcr@v14
16+
with:
17+
image_name: ${{ github.repository }}
18+
image_tag: ${{ steps.compute-sha.outputs.short_sha }}
19+
github_token: ${{ secrets.GHCR_TOKEN }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ ENV PYTHONUNBUFFERED=1
55

66
RUN apk add --no-cache git
77
RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community openjdk21
8-
COPY run-tests.py /run-tests.py
8+
COPY src/run-tests.py /run-tests.py
99

1010
ENTRYPOINT ["python3", "/run-tests.py"]

action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ inputs:
2020
# description: 'Whether or not the tests passed'
2121

2222
runs:
23-
using: 'docker'
24-
image: 'Dockerfile'
23+
using: 'composite'
2524
args:
2625
- ${{ inputs.test-script-directory }}
2726
- ${{ inputs.skript-repo-ref }}

run-tests.py renamed to src/run-tests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class EnvironmentResource(TypedDict):
6060
))
6161
with open(environment_file_path, "w") as environment_file:
6262
json.dump(environment, environment_file)
63+
6364
shutil.rmtree(custom_test_directory, ignore_errors=True)
6465
shutil.copytree(test_script_directory, custom_test_directory)
6566
gradle_test_process = subprocess.run(("./gradlew", "quickTest"))

0 commit comments

Comments
 (0)