mirror of
https://github.com/Luzifer/github-publish.git
synced 2024-11-09 14:50:07 +00:00
Add image signing to docker2aci
This commit is contained in:
parent
0f3549be9d
commit
f70612b9e8
2 changed files with 9 additions and 5 deletions
|
@ -1,2 +1,2 @@
|
|||
7667227aa6cbc823618cf4ffb2483e552823a911f6baac7c558b6803c478bd55 docker2aci.sh
|
||||
05e4977d541b2ef07c757acca912b7b58b379fb425eceb3a1f53c829a78a4aa4 docker2aci.sh
|
||||
baae3f7cfe082d64882bdc2ec914962434f88bf18985ec0accdb74f36c6cb645 golang.sh
|
||||
|
|
|
@ -32,6 +32,11 @@ if [ -z "${GHUSER}" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${GPG_KEY}" ]; then
|
||||
echo "Please set \$GPG_KEY environment variable"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DOCKER_IMAGE="${GHUSER,,}/${REPO,,}:${VERSION,,}"
|
||||
ACIMAGE="${GHUSER,,}-${REPO,,}-${VERSION,,}.aci"
|
||||
|
||||
|
@ -45,16 +50,15 @@ docker build -t ${DOCKER_IMAGE} ${DOCKERFILE_PATH}
|
|||
docker save -o build.docker ${DOCKER_IMAGE}
|
||||
|
||||
./docker2aci build.docker
|
||||
gpg2 --local-user ${GPG_KEY} --armor --output ${ACIMAGE}.asc --detach-sig ${ACIMAGE}
|
||||
|
||||
# TODO: Sign release
|
||||
|
||||
sha256sum ${ACIMAGE} > SHA256SUMS
|
||||
sha256sum ${ACIMAGE} ${ACIMAGE}.asc > SHA256SUMS
|
||||
|
||||
# Create a drafted release
|
||||
github-release release --user ${GHUSER} --repo ${REPO} --tag ${VERSION} --name ${VERSION} --draft || true
|
||||
|
||||
# Upload build assets
|
||||
for file in ${ACIMAGE} SHA256SUMS; do
|
||||
for file in ${ACIMAGE} ${ACIMAGE}.asc SHA256SUMS; do
|
||||
github-release upload --user ${GHUSER} --repo ${REPO} --tag ${VERSION} --name ${file} --file ${file}
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in a new issue