-
Notifications
You must be signed in to change notification settings - Fork 2
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
Provide a Github action/workflow to automatically manala up on .manala changes #23
Comments
Wow, with a ready-to-merge pull request ? With goreleaser, we could build a docker image, but before your issue, i've never seen a good reason to do it :) |
Very basically introduced on-per-project basis with the following patch: diff --git a/.github/actions/manala-up/action.yml b/.github/actions/manala-up/action.yml
new file mode 100644
index 000000000..3edd1e57b
--- /dev/null
+++ b/.github/actions/manala-up/action.yml
@@ -0,0 +1,16 @@
+name: Manala update
+description: 'Automatically run manala update on .manala.yml changes in case the developper forgot it'
+
+runs:
+ using: composite
+ steps:
+
+ - name: Install Manala binary
+ shell: bash
+ run: |
+ curl -sfL https://raw.githubusercontent.com/manala/manala/master/godownloader.sh | sh
+ echo "./bin/" >> $GITHUB_PATH
+
+ - name: Run Manala update
+ shell: bash
+ run: manala update
diff --git a/.github/workflows/manala-up.yml b/.github/workflows/manala-up.yml
new file mode 100644
index 000000000..84ebfe2ae
--- /dev/null
+++ b/.github/workflows/manala-up.yml
@@ -0,0 +1,32 @@
+name: Manala up
+on:
+ push:
+ branches:
+ - master
+ paths:
+ - '.manala.yaml'
+ pull_request:
+ paths:
+ - '.manala.yaml'
+
+jobs:
+ up:
+ runs-on: ubuntu-latest
+ steps:
+
+ - name: Checkout head
+ uses: actions/checkout@v2
+
+ - name: Setup & Run Manala update
+ uses: ./.github/actions/manala-up
+
+ # https://github.com/EndBug/add-and-commit
+ - name: Commit & push changes
+ uses: EndBug/add-and-commit@v4
+ with:
+ author_name: GitHub Actions Bot
+ author_email: actions@github.com
+ message: '[AUTO] By Github Actions: Run manala update'
+ add: ".manala/"
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} We could provide an official action for Manala setup and add a way to generate the worflow automatically with the Manala CLI. |
what about having a |
Sure, but the resulting path where to generate the workflow file has to be in the |
Also, something interesting is Organization Workflows templates: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/sharing-workflows-with-your-organization |
So we won't even miss an update
The text was updated successfully, but these errors were encountered: