Skip to content

Commit ca1072b

Browse files
authored
Merge pull request #280 from danger/prepare-1.3.1
feat(docker): add gha for manual update docker
2 parents fb1d13d + 9b89799 commit ca1072b

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

.github/workflows/docker_manual.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release distribution
2+
3+
on:
4+
workflow_dispatch :
5+
inputs:
6+
docker-version:
7+
description: "Docker Version"
8+
danger-js-version:
9+
description: "Danger JS release version"
10+
default: "11.3.1"
11+
danger-kotlin-version:
12+
description: "Danger Kotlin release version"
13+
kotlin-version:
14+
description: "Kotlin Version"
15+
default: "1.7.22"
16+
17+
jobs:
18+
docker-build-push:
19+
name: Build and Push Docker image
20+
permissions:
21+
contents: read
22+
packages: write
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Docker Login
28+
run: echo $PACKAGES_WRITE_TOKEN | docker login ghcr.io -u $USERNAME --password-stdin
29+
env:
30+
PACKAGES_WRITE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
USERNAME: ${{ github.actor }}
32+
33+
- name: Docker Build
34+
run: docker build -t ghcr.io/danger/danger-kotlin:$VERSION --build-arg="KOTLINC_VERSION=$KOTLINC_VERSION" --build-arg="DANGER_KOTLIN_VERSION=$DANGER_KOTLIN_VERSION" --build-arg="DANGER_JS_VERSION=$DANGER_JS_VERSION" .
35+
env:
36+
VERSION: ${{ github.event.inputs.docker-version }}
37+
KOTLINC_VERSION: ${{ github.event.inputs.kotlin-version }}
38+
DANGER_KOTLIN_VERSION: ${{ github.event.inputs.danger-kotlin-version }}
39+
DANGER_JS_VERSION: ${{ github.event.inputs.danger-js-version }}
40+
41+
- name: Deploy
42+
run: docker push ghcr.io/danger/danger-kotlin:$VERSION
43+
env:
44+
VERSION: ${{ github.event.inputs.docker-version }}

Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ LABEL "com.github.actions.color"="blue"
99

1010
ARG KOTLINC_VERSION="1.7.22"
1111
ARG DANGER_KOTLIN_VERSION="1.3.1"
12+
ARG DANGER_JS_VERSION="11.3.1"
1213

1314
# Install dependencies
1415
RUN apt-get update
@@ -21,7 +22,7 @@ RUN wget -q "https://github.com/JetBrains/kotlin/releases/download/v$KOTLINC_VER
2122
ENV PATH $PATH:/usr/lib/kotlinc/bin
2223

2324
# Install Danger-JS
24-
RUN npm install -g danger
25+
RUN npm install -g "danger@$DANGER_JS_VERSION
2526
2627
# Install Danger-Kotlin
2728
RUN wget -q "https://github.com/danger/kotlin/releases/download/$DANGER_KOTLIN_VERSION/danger-kotlin-linuxX64.tar" && \

0 commit comments

Comments
 (0)