-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
⬆️ Bump yq version #41
Conversation
bcb5002
to
03e65f5
Compare
@@ -163,40 +163,44 @@ runs: | |||
if [[ ( $GITHUB_REF == refs/heads/master || $GITHUB_REF == refs/heads/main ) && -n "${{ inputs.gitopsstage }}" ]]; then | |||
echo "Run update for STAGE" | |||
while IFS= read -r line; do | |||
array=($line) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
split input by blank
action.yml
Outdated
echo "Check if path $line exists and get old current version" | ||
yq r -e $line | ||
yq -e .${array[1]} ${array[0]} | ||
echo "Run update $line ${{ inputs.dockerregistry }}/${{ inputs.dockerimage }}:${{ steps.preparation.outputs.tag }}" | ||
yq w -i $line ${{ inputs.dockerregistry }}/${{ inputs.dockerimage }}:${{ steps.preparation.outputs.tag }} | ||
yq -i .${array[1]}=\"${{ inputs.dockerregistry }}/${{ inputs.dockerimage }}:${{ steps.preparation.outputs.tag }}\" ${array[0]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
migrated the calls from version 3 to 4
# download and install yq | ||
sudo wget -O /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/3.4.1/yq_linux_amd64 | ||
sudo chmod +x /usr/local/bin/yq |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yq is already part of the github action with ubuntu 20: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#tools
git clone https://${{ inputs.gitopsuser }}:${{ inputs.gitopstoken }}@github.com/${{ inputs.gitopsorganization }}/${{ inputs.gitopsrepository }}.git .github/${{ inputs.gitopsrepository }} | ||
cd .github/${{ inputs.gitopsrepository }} | ||
echo "Repository ${{ inputs.gitopsorganization }}/${{ inputs.gitopsrepository }} was cloned successfully " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use explicit checkout action
* 🎨 reformat table * 🔥 remove gitopsenabled * 🔥 remove dockerenabled * 📝 improve usage documentation * 🎨 add missing docker image * 🚚 rename parameters (#45)
Type of Change
Description
Checklist