Update all minor, or patch dependencies on npm #343
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push a new tag when PR with specified labels was merged | |
on: | |
pull_request: | |
types: [closed] | |
jobs: | |
tagged: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions-ecosystem/action-release-label@v1 | |
id: release-label | |
if: ${{ github.event.pull_request.merged == true }} | |
- uses: imranismail/setup-kustomize@v2 | |
- uses: actions/checkout@v4 | |
if: ${{ steps.release-label.outputs.level != null }} | |
with: | |
# to trigger release.yml Action | |
token: ${{ secrets.TOKEN }} | |
- uses: actions-ecosystem/action-get-latest-tag@v1 | |
id: get-latest-tag | |
if: ${{ steps.release-label.outputs.level != null }} | |
- uses: actions-ecosystem/action-bump-semver@v1 | |
id: bump-semver | |
if: ${{ steps.release-label.outputs.level != null }} | |
with: | |
current_version: ${{ steps.get-latest-tag.outputs.tag }} | |
level: ${{ steps.release-label.outputs.level }} | |
- if: ${{ steps.release-label.outputs.level != null }} | |
run: | | |
: # Push tag for new_version with updating manifests | |
sudo chmod -R ugo+rwX . | |
git config user.email "[email protected]" | |
git config user.name "GitHub Action" | |
: ## update manifest's tag | |
cd manifests/base/ | |
kustomize edit set image kanatakita/kube-portal:${{ steps.bump-semver.outputs.new_version }} | |
cd .. | |
kustomize build ./install/ > ./install.yaml | |
: ## commit the above & grant a tag for new_version | |
git add . | |
git commit -m "update manifests" | |
git tag ${{ steps.bump-semver.outputs.new_version }} | |
: ## revert the commit & push to origin | |
git revert HEAD --no-edit | |
git push origin HEAD | |
git push origin ${{ steps.bump-semver.outputs.new_version }} |