Update version file #17
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: Update version file | |
on: | |
workflow_run: | |
branches: [ master ] | |
workflows: [Modoboa installer] | |
types: | |
- completed | |
jobs: | |
update-version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
ref: ${{ github.head_ref }} | |
- name: Overwrite file | |
uses: "DamianReeves/write-file-action@master" | |
with: | |
path: version.txt | |
write-mode: overwrite | |
contents: ${{ github.sha }} | |
- name: Commit & Push | |
uses: Andro999b/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref_name }} | |
force: true | |
message: '[GitHub Action] Updated version file' |