diff --git a/.github/workflows/publish-to-ansible-galaxy.yml b/.github/workflows/publish-to-ansible-galaxy.yml index 282d8bf..43856eb 100644 --- a/.github/workflows/publish-to-ansible-galaxy.yml +++ b/.github/workflows/publish-to-ansible-galaxy.yml @@ -9,15 +9,21 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + ref: main + token: ${{ secrets.DEVOPS_BOT_PAT }} - name: Update version run: | echo "Updating version" sed -i "s/version: .*/version: ${{ github.event.release.tag_name }}/g" galaxy.yml + - uses: stefanzweifel/git-auto-commit-action@v4 with: - commit_message: "Update version to ${{ github.event.release.tag_name }}" + commit_message: "Update galaxy.yml version to ${{ github.event.release.tag_name }}" branch: "main" + file_pattern: "galaxy.yml" + push_options: --force ansible-publish: runs-on: ubuntu-latest