File: update-specs.yml

package info (click to toggle)
python-ecs-logging 2.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 344 kB
  • sloc: python: 1,116; sh: 30; makefile: 7
file content (54 lines) | stat: -rw-r--r-- 1,652 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
# Send PRs to the subscribed ECS Agents if the spec files (JSON) are modified
name: update-specs

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@v6

      - name: Get token
        id: get_token
        uses: actions/create-github-app-token@v2
        with:
          app-id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
          private-key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
          permission-contents: write
          permission-pull-requests: write

      - uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - uses: elastic/oblt-actions/updatecli/run@v1
        with:
          command: --experimental compose diff
        env:
          GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}

      - uses: elastic/oblt-actions/updatecli/run@v1
        with:
          command: --experimental compose apply
        env:
          GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}

      - if: failure()
        uses: elastic/oblt-actions/slack/send@v1
        with:
          bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
          channel-id: "#apm-agent-python"
          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>"