Skip to content

Commit d55968c

Browse files
committed
schedule ami workflow
1 parent 7c01f4b commit d55968c

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

.github/updatecli/updatecli_amis.tpl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,30 @@ sources:
3030
targets:
3131
{{- range $key, $target := .targets }}
3232
yml_{{ $key }}:
33+
name: {{ $target.source }} bump
3334
kind: yaml
3435
sourceid: src_{{ $target.source }}
36+
scmid: "github"
3537
spec:
3638
engine: yamlpath # https://github.com/updatecli/updatecli/issues/4490
3739
file: '{{ $target.file }}'
3840
key: '{{ $target.key }}'
3941
comment: '{{ source (printf "src_name_%s" $target.source) }}'
4042
{{- end }}
43+
44+
actions:
45+
pr:
46+
kind: "github/pullrequest"
47+
scmid: "github"
48+
spec:
49+
title: "Bump AMIs version"
50+
51+
scms:
52+
github:
53+
kind: "github"
54+
spec:
55+
owner: "Alfresco"
56+
repository: "alfresco-ansible-deployment"
57+
branch: "master"
58+
token: {{ requiredEnv "UPDATECLI_GITHUB_TOKEN" }}
59+
username: {{ requiredEnv "UPDATECLI_GITHUB_USERNAME" }}

.github/workflows/bumpVersions.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Bump versions
33
run-name: Bump ${{ inputs.update-type || 'all' }} using alfresco-updatecli/${{ inputs.alfresco-updatecli-ref || 'master' }}
44

55
on:
6+
schedule:
7+
- cron: '52 6 * * 1'
68
push:
79
paths:
810
- .github/workflows/bumpVersions.yml
@@ -77,7 +79,7 @@ jobs:
7779
UPDATECLI_GITHUB_USERNAME: ${{ vars.BOT_GITHUB_USERNAME}}
7880

7981
- name: Updatecli apply for AMIs
80-
if: inputs.update-type == 'ami' || github.event_name == 'push'
82+
if: inputs.update-type == 'ami' || github.event_name == 'push' || github.event_name == 'schedule'
8183
shell: bash
8284
run: |
8385
updatecli apply --config .github/updatecli/updatecli_amis.tpl \
@@ -86,6 +88,8 @@ jobs:
8688
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
8789
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
8890
AWS_REGION: eu-west-1
91+
UPDATECLI_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
92+
UPDATECLI_GITHUB_USERNAME: ${{ vars.BOT_GITHUB_USERNAME}}
8993

9094
- name: Git Auto Commit
9195
uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5.1.0

0 commit comments

Comments
 (0)