Fix and test choco action (#911)
* ci(choco): fix action Signed-off-by: hackercat <me@hackerc.at> * fix(editorconfig): force style for all files, fix typo Signed-off-by: hackercat <me@hackerc.at> * ci(choco): test choco action Signed-off-by: hackercat <me@hackerc.at> * fix(editorconfig): unformat Dockerfile/sh Signed-off-by: hackercat <me@hackerc.at>
This commit is contained in:
parent
b910a42edf
commit
a545ceaec9
|
@ -5,12 +5,17 @@ end_of_line = lf
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
# Override for Makefile
|
|
||||||
[{Makefile, makefile, GNUmakefile}]
|
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
[*.{yml.yaml,json}]
|
[*.sh]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[Dockerfile]
|
||||||
|
indent_style = unset
|
||||||
|
indent_size = unset
|
||||||
|
|
||||||
|
[*.{yml,yaml,json}]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
|
@ -2,18 +2,19 @@ FROM alpine:latest
|
||||||
|
|
||||||
ARG CHOCOVERSION=0.11.3
|
ARG CHOCOVERSION=0.11.3
|
||||||
|
|
||||||
RUN apk add --no-cache bash ca-certificates \
|
RUN apk add --no-cache bash ca-certificates git \
|
||||||
&& apk --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing add mono-dev \
|
&& apk --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing add mono mono-dev \
|
||||||
&& cert-sync /etc/ssl/certs/ca-certificates.crt \
|
&& cert-sync /etc/ssl/certs/ca-certificates.crt \
|
||||||
&& wget "https://github.com/chocolatey/choco/archive/${CHOCOVERSION}.tar.gz" \
|
&& wget "https://github.com/chocolatey/choco/archive/${CHOCOVERSION}.tar.gz" -O- | tar -xzf - \
|
||||||
&& tar -xzf "${CHOCOVERSION}.tar.gz" \
|
&& cd choco-"${CHOCOVERSION}" \
|
||||||
&& mv "choco-${CHOCOVERSION}" /opt/chocolatey \
|
|
||||||
&& chmod +x build.sh zip.sh \
|
&& chmod +x build.sh zip.sh \
|
||||||
&& ./build.sh -v \
|
&& ./build.sh -v \
|
||||||
&& ln -sf /opt /opt/chocolatey/opt \
|
&& mv ./code_drop/chocolatey/console /opt/chocolatey \
|
||||||
&& mkdir -p /opt/chocolatey/lib \
|
&& mkdir -p /opt/chocolatey/lib \
|
||||||
&& apk del ca-certificates \
|
&& rm -rf /choco-"${CHOCOVERSION}" \
|
||||||
|
&& apk del mono-dev \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
ENV ChocolateyInstall=/opt/chocolatey
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
|
@ -3,10 +3,14 @@ description: 'Create the choco package and push it'
|
||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
description: 'Version of package'
|
description: 'Version of package'
|
||||||
required: true
|
required: false
|
||||||
apiKey:
|
apiKey:
|
||||||
description: 'API Key for chocolately'
|
description: 'API Key for chocolately'
|
||||||
required: true
|
required: false
|
||||||
|
push:
|
||||||
|
description: 'Option for if package is going to be pushed'
|
||||||
|
required: false
|
||||||
|
default: 'false'
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'Dockerfile'
|
image: 'Dockerfile'
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
function choco {
|
function choco {
|
||||||
mono /opt/chocolatey/code_drop/chocolatey/choco.exe "$@" --allow-unofficial --nocolor
|
mono /opt/chocolatey/choco.exe "$@" --allow-unofficial --nocolor
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_version {
|
function get_version {
|
||||||
|
@ -26,4 +26,6 @@ cp LICENSE tools/LICENSE.txt
|
||||||
cp VERIFICATION tools/VERIFICATION.txt
|
cp VERIFICATION tools/VERIFICATION.txt
|
||||||
cp dist/act_windows_amd64/act.exe tools/
|
cp dist/act_windows_amd64/act.exe tools/
|
||||||
choco pack act-cli.nuspec --version ${VERSION}
|
choco pack act-cli.nuspec --version ${VERSION}
|
||||||
choco push act-cli.${VERSION}.nupkg --api-key ${INPUT_APIKEY} -s https://push.chocolatey.org/ --timeout 180
|
if [[ "$INPUT_PUSH" == "true" ]]; then
|
||||||
|
choco push act-cli.${VERSION}.nupkg --api-key ${INPUT_APIKEY} -s https://push.chocolatey.org/ --timeout 180
|
||||||
|
fi
|
||||||
|
|
|
@ -149,3 +149,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: act-macos-arm64
|
name: act-macos-arm64
|
||||||
path: dist/act_darwin_arm64/act
|
path: dist/act_darwin_arm64/act
|
||||||
|
- name: Chocolatey
|
||||||
|
uses: ./.github/actions/choco
|
||||||
|
with:
|
||||||
|
version: v0.0.0-pr
|
||||||
|
|
|
@ -37,3 +37,4 @@ jobs:
|
||||||
with:
|
with:
|
||||||
version: ${{ github.ref }}
|
version: ${{ github.ref }}
|
||||||
apiKey: ${{ secrets.CHOCO_APIKEY }}
|
apiKey: ${{ secrets.CHOCO_APIKEY }}
|
||||||
|
push: true
|
||||||
|
|
Loading…
Reference in New Issue