Skip to content
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

🎨 download yq if necessary #38

Merged
merged 5 commits into from
Jul 12, 2022
Merged

🎨 download yq if necessary #38

merged 5 commits into from
Jul 12, 2022

Conversation

flaxel
Copy link
Contributor

@flaxel flaxel commented Jun 28, 2022

Type of Change

  • Bugfix
  • Enhancement / new feature
  • Refactoring
  • Documentation

Description

  • yq is now downloaded and installed
  • updated documentation
  • test it with the backstage app in this pr

Checklist

  • Write tests
  • Make sure all tests pass
  • Update documentation
  • Review the Contributing Guideline and sign CLA
  • Reference relevant issue(s) and close them after merging

@flaxel flaxel linked an issue Jun 28, 2022 that may be closed by this pull request
README.md Outdated
Comment on lines 34 to 39
- uses: actions/checkout@v3
with:
repository: Staffbase/gitops-github-action
ref: v3
# It's important that you clone the repository into the .github/gitops path, because the GitHub Action has a hard dependency on this path.
path: .github/gitops
Copy link
Contributor Author

@flaxel flaxel Jun 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checkout of the complete repo is not necessary anymore.

action.yml Outdated
@@ -138,6 +138,7 @@ runs:
cache-to: type=gha,mode=max

- name: Update Docker Image in Repository
if: inputs.gitopsenabled == 'true'
Copy link
Contributor Author

@flaxel flaxel Jun 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved check if gitops is enabled - same implementation as for docker.

action.yml Outdated
Comment on lines 153 to 157
# 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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is the important change, so the binary is downloaded and installed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@flaxel flaxel Jun 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would do that in the issue #40. I didn't want to make all the changes in one PR, otherwise it would be too confusing and the migration from version 3 to 4 still needs to be done. I would do that after the PR is merged.

Copy link
Contributor Author

@flaxel flaxel Jul 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created another pr #41 for it.

@@ -149,51 +150,53 @@ runs:
fi
}

if [[ ${{ inputs.gitopsenabled }} == "true" ]]; then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There I moved the check - further lines are only formatting stuff.

action.yml Outdated
echo "Run update for STAGE"
while IFS= read -r line; do
echo "Check if path $line exists and get old current version"
yq r -e $line
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the installed binary. 🎉

@flaxel flaxel marked this pull request as ready for review June 28, 2022 15:03
@flaxel flaxel requested a review from a team as a code owner June 28, 2022 15:03
action.yml Outdated
Comment on lines 153 to 157
# 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@flaxel flaxel requested a review from 0x46616c6b June 29, 2022 11:20
* ⬆️ bump yq

* 🔥 remove debugging line

* 🔥 remove explicit yq installation

* 🎨 using checkout action for gitops

* 🔥 Remove options (#43)

* 🎨 reformat table

* 🔥 remove gitopsenabled

* 🔥 remove dockerenabled

* 📝 improve usage documentation

* 🎨 add missing docker image

* 🚚 rename parameters (#45)
@flaxel flaxel merged commit 8e5552a into main Jul 12, 2022
@flaxel flaxel deleted the download-yq branch July 12, 2022 12:50
@github-actions github-actions bot locked and limited conversation to collaborators Jul 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🔥 Remove yq file
2 participants