mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 05:38:04 +00:00
Cleaning up release process, fixed github action version
This commit is contained in:
parent
94a563dfd8
commit
a6ae33c3f1
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -68,7 +68,9 @@ jobs:
|
||||
|
||||
- name: Build and push image
|
||||
run: |
|
||||
IMAGE_VERSION="$(git describe --tags --abbrev=0)"
|
||||
IMAGE_V_VERSION="$(git describe --tags --abbrev=0)"
|
||||
IMAGE_VERSION=${IMAGE_V_VERSION:1}
|
||||
|
||||
SHORT_SHA1=$(git rev-parse --short HEAD)
|
||||
PLATFORMS="linux/amd64,linux/ppc64le,linux/arm64"
|
||||
echo "Building and pushing version ${IMAGE_VERSION} of image ${IMAGE_NAME}"
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM mikefarah/yq:3
|
||||
FROM mikefarah/yq:4.2.0
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
- increment version in version.go
|
||||
- increment version in snapcraft.yaml
|
||||
- increment version in github-action/Dockerfile
|
||||
- make sure local build passes
|
||||
- tag git with same version number
|
||||
- commit vX tag - this will trigger github actions
|
||||
|
@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
VERSION="$(git describe --tags --abbrev=0)"
|
||||
docker build \
|
||||
--target production \
|
||||
--build-arg VERSION=${VERSION} \
|
||||
-t mikefarah/yq:latest \
|
||||
-t mikefarah/yq:${VERSION} \
|
||||
-t mikefarah/yq:4 \
|
||||
.
|
||||
|
||||
trivy image mikefarah/yq:${VERSION}
|
@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
GITHUB_TOKEN="${GITHUB_TOKEN:?missing required input \'GITHUB_TOKEN\'}"
|
||||
|
||||
CURRENT="$(git describe --tags --abbrev=0)"
|
||||
PREVIOUS="$(git describe --tags --abbrev=0 --always "${CURRENT}"^)"
|
||||
OWNER="mikefarah"
|
||||
REPO="yq"
|
||||
|
||||
release() {
|
||||
github-release release \
|
||||
--user "$OWNER" \
|
||||
--draft \
|
||||
--repo "$REPO" \
|
||||
--tag "$CURRENT"
|
||||
}
|
||||
|
||||
|
||||
|
||||
release
|
||||
|
@ -1,28 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
GITHUB_TOKEN="${GITHUB_TOKEN:?missing required input \'GITHUB_TOKEN\'}"
|
||||
|
||||
CURRENT="$(git describe --tags --abbrev=0)"
|
||||
PREVIOUS="$(git describe --tags --abbrev=0 --always "${CURRENT}"^)"
|
||||
OWNER="mikefarah"
|
||||
REPO="yq"
|
||||
|
||||
upload() {
|
||||
mkdir -p ./build-done
|
||||
while IFS= read -r -d $'\0'; do
|
||||
file=$REPLY
|
||||
BINARY=$(basename "${file}")
|
||||
echo "--> ${BINARY}"
|
||||
github-release upload \
|
||||
--replace \
|
||||
--user "$OWNER" \
|
||||
--repo "$REPO" \
|
||||
--tag "$CURRENT" \
|
||||
--name "${BINARY}" \
|
||||
--file "$file"
|
||||
mv "$file" "./build-done/${BINARY}"
|
||||
done < <(find ./build -mindepth 1 -maxdepth 1 -print0)
|
||||
}
|
||||
|
||||
|
||||
upload
|
Loading…
Reference in New Issue
Block a user