Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancements for github action to bump stack version #1986

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,13 @@ updates:
k8s:
patterns:
- "k8s.io/*"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
open-pull-requests-limit: 2
labels:
- automation
reviewers:
- "elastic/ecosystem"
22 changes: 18 additions & 4 deletions .github/workflows/bump-elastic-stack-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
workflow_dispatch:
schedule:
- cron: '0 1 * * 1-5'
pull_request:
paths:
- .github/updatecli.d/*
- .github/workflows/bump-elastic-stack-version.yml

permissions:
contents: read
Expand All @@ -20,29 +24,39 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Select diff action
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "UPDATECLI_ACTION=diff" >> $GITHUB_ENV

- name: Select apply action
if: ${{ github.event_name != 'pull_request' }}
run: |
echo "UPDATECLI_ACTION=apply" >> $GITHUB_ENV

- name: Install Updatecli in the runner
uses: updatecli/[email protected] # updatecli v0.77.0

- name: Update default stack version
# --experimental needed for commitusingapi option.
run: updatecli --experimental apply --config .github/workflows/updatecli.d/bump-elastic-stack-version.yml --values .github/workflows/updatecli.d/scm.yml
run: updatecli --experimental ${{ env.UPDATECLI_ACTION }} --config .github/workflows/updatecli.d/bump-elastic-stack-version.yml --values .github/workflows/updatecli.d/scm.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update latest testing 7.x stack version
# --experimental needed for commitusingapi option.
run: updatecli --experimental apply --config .github/workflows/updatecli.d/bump-latest-7x-version.yml --values .github/workflows/updatecli.d/scm.yml
run: updatecli --experimental ${{ env.UPDATECLI_ACTION }} --config .github/workflows/updatecli.d/bump-latest-7x-version.yml --values .github/workflows/updatecli.d/scm.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update latest testing stack version
# --experimental needed for commitusingapi option.
run: updatecli --experimental apply --config .github/workflows/updatecli.d/bump-latest-snapshot-version.yml --values .github/workflows/updatecli.d/scm.yml
run: updatecli --experimental ${{ env.UPDATECLI_ACTION }} --config .github/workflows/updatecli.d/bump-latest-snapshot-version.yml --values .github/workflows/updatecli.d/scm.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update Package Registry version
# --experimental needed for commitusingapi option.
run: updatecli --experimental apply --config .github/workflows/updatecli.d/bump-package-registry-version.yml --values .github/workflows/updatecli.d/scm.yml
run: updatecli --experimental ${{ env.UPDATECLI_ACTION }} --config .github/workflows/updatecli.d/bump-package-registry-version.yml --values .github/workflows/updatecli.d/scm.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}