Skip to content

chore: Add release-please (#3) #1

chore: Add release-please (#3)

chore: Add release-please (#3) #1

Workflow file for this run

name: "release-please"
on:
push:
branches:
- "main"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
releases-created: ${{ steps.release.outputs.releases_created }}
ansible-release-created: ${{ steps.release.outputs['ansible--release_created'] }}
ansible-version: ${{ steps.release.outputs['ansible--version'] }}
steps:
- name: Run release-please
id: release
uses: google-github-actions/release-please-action@v3
with:
token: ${{ secrets.FLUENCEBOT_RELEASE_PLEASE_PAT }}
command: manifest
config-file: .github/release-please/config.json
manifest-file: .github/release-please/manifest.json
- name: Show output from release-please
if: steps.release.outputs.releases_created
env:
RELEASE_PLEASE_OUTPUT: ${{ toJSON(steps.release.outputs) }}
run: echo "${RELEASE_PLEASE_OUTPUT}" | jq
ansible:
if: needs.release-please.outputs.ansible-release-created
runs-on: ubuntu-latest
needs:
- release-please
steps:
- uses: actions/checkout@v4
- name: Push to galaxy
uses: ansible-actions/[email protected]
with:
path: ansible/
galaxy_api_key: ${{ secrets.GALAXY_API_KEY }}
galaxy_version: ${{ needs.release-please.outputs.ansible-version }}
slack:
if: always()
name: "Notify"
runs-on: ubuntu-latest
needs:
- release-please
- ansible
permissions:
contents: read
id-token: write
steps:
- uses: lwhiteley/dependent-jobs-result-check@v1
id: status
with:
statuses: failure
dependencies: ${{ toJSON(needs) }}
- name: Log output
run: |
echo "statuses:" "${{ steps.status.outputs.statuses }}"
echo "jobs:" "${{ steps.status.outputs.jobs }}"
echo "found any?:" "${{ steps.status.outputs.found }}"
- name: Import secrets
uses: hashicorp/[email protected]
with:
url: https://vault.fluence.dev
path: jwt/github
role: ci
method: jwt
jwtGithubAudience: "https://github.com/fluencelabs"
jwtTtl: 300
exportToken: false
secrets: |
kv/slack/release-please webhook | SLACK_WEBHOOK_URL
- uses: ravsamhq/notify-slack-action@v2
if: steps.status.outputs.found == 'true'
with:
status: "failure"
notification_title: "*{workflow}* has {status_message}"
message_format: "${{ steps.status.outputs.jobs }} {status_message} in <{repo_url}|{repo}>"
footer: "<{run_url}>"