Skip to content

update-compose

update-compose #731

---
name: update-compose
on:
workflow_dispatch:
schedule:
- cron: '0 6 * * *'
permissions:
contents: read
jobs:
compose:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
steps:
- uses: actions/checkout@v7
- name: Get token
id: get_token
uses: actions/create-github-app-token@v3
with:
app-id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
private-key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
owner: ${{ github.repository_owner }}
repositories: |
apm-server
permission-contents: write
permission-pull-requests: write
- uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: elastic/oblt-actions/updatecli/run@v1
with:
command: compose diff
env:
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
- uses: elastic/oblt-actions/updatecli/run@v1
with:
command: compose apply
env:
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
- if: ${{ failure() }}
uses: elastic/oblt-actions/slack/send@v1
with:
channel-id: '#apm-server'
message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>"
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}