Skip to content

Commit 2a05b1f

Browse files
committed
Merge branch '28-add-possibility-to-upload-file-from-http-direct-link' of github.com:cloudnode-pro/modrinth-publish into 28-add-possibility-to-upload-file-from-http-direct-link
2 parents d6e223e + b9c6d77 commit 2a05b1f

File tree

4 files changed

+40
-6
lines changed

4 files changed

+40
-6
lines changed

.github/workflows/publish.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags: [v*]
6+
7+
permissions:
8+
packages: write
9+
10+
env:
11+
IMAGE_NAME: modrinth-publish
12+
13+
jobs:
14+
publish:
15+
name: Publish
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Build image
22+
run: docker build . --file Dockerfile --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
23+
24+
- name: Log in to GitHub Container Registry
25+
run: echo "${{ github.token }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
26+
27+
- name: Push image
28+
run: |
29+
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
30+
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
31+
TAG=${GITHUB_REF#refs/tags/}
32+
VERSION=${TAG#v}
33+
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
34+
docker push $IMAGE_ID:$VERSION

action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ outputs:
5555
description: Version ID generated by Modrinth.
5656
runs:
5757
using: docker
58-
image: Dockerfile
58+
image: docker://ghcr.io/cloudnode-pro/modrinth-publish:2.0.0
5959
env:
6060
GH_INPUTS: ${{ toJSON(inputs) }}
6161
branding:

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"@actions/core": "^1.11.1"
99
},
1010
"devDependencies": {
11-
"@types/node": "^22.13.4",
11+
"@types/node": "^22.13.5",
1212
"typescript": "^5.7.3"
1313
}
1414
}

0 commit comments

Comments
 (0)