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

Add auto-update gemfiles workflow #3927

Merged
merged 4 commits into from
Sep 20, 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
105 changes: 105 additions & 0 deletions .github/workflows/auto-update-gemfiles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Auto-update Gemfiles

on:
schedule:
- cron: '0 0 * * 0' # Every Sunday at midnight
push:
branches:
- quinna/update-gemfiles-workflow # TODO: remove, for testing
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-22.04
permissions:
quinna-h marked this conversation as resolved.
Show resolved Hide resolved
contents: read
strategy:
fail-fast: false
matrix:
engine:
# ADD NEW RUBIES HERE
- name: ruby
version: '3.4'
- name: ruby
version: '3.3'
- name: ruby
version: '3.2'
- name: ruby
version: '3.1'
- name: ruby
version: '3.0'
- name: ruby
version: '2.7'
- name: ruby
version: '2.6'
- name: ruby
version: '2.5'
- name: jruby
version: '9.4'
- name: jruby
version: '9.3'
- name: jruby
version: '9.2'
container:
image: "ghcr.io/datadog/images-rb/engines/${{ matrix.engine.name }}:${{ matrix.engine.version }}"
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Output Ruby version
run: ruby -v

- name: Bundle
run: bundle install

- name: Update latest
run: bundle exec rake edge:latest

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: 'gha${{ github.run_id }}-datadog-gem-${{ matrix.engine.name }}-${{ matrix.engine.version }}'
path: gemfiles/${{ matrix.engine.name }}_${{ matrix.engine.version }}_*
retention-days: 3

aggregate:
needs: build
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download artifacts for all runtimes
uses: actions/download-artifact@v4
with:
path: gemfiles
pattern: gha${{ github.run_id }}-datadog-gem-*
merge-multiple: true

- run: git diff

- name: Create Pull Request
quinna-h marked this conversation as resolved.
Show resolved Hide resolved
uses: peter-evans/create-pull-request@v7
with:
branch: update-latest-gemfiles
commit-message: "update latest gemfiles, workflow run: ${{ github.run_id }}"
delete-branch: true
base: master
title: 'Update Latest Gemfiles'
labels: dev/internal, integrations
body: |
quinna-h marked this conversation as resolved.
Show resolved Hide resolved
This is an auto-generated PR from 'Auto-update Gemfiles' workflow.
The PR updates the integration gemfiles to latest versions of dependencies.

Merge if green, otherwise add to backlog.
quinna-h marked this conversation as resolved.
Show resolved Hide resolved

The default behavior is to create a pull request that will be continually updated with new changes
until it is merged or closed.
1 change: 0 additions & 1 deletion gemfiles/ruby_3.0_rails7.gemfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions gemfiles/ruby_3.0_rails7.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion gemfiles/ruby_3.0_rails71.gemfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions gemfiles/ruby_3.0_rails71.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion gemfiles/ruby_3.1_rails7.gemfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions gemfiles/ruby_3.1_rails7.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion gemfiles/ruby_3.1_rails71.gemfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions gemfiles/ruby_3.1_rails71.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion gemfiles/ruby_3.2_rails7.gemfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions gemfiles/ruby_3.2_rails7.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion gemfiles/ruby_3.2_rails71.gemfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions gemfiles/ruby_3.2_rails71.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion gemfiles/ruby_3.3_rails7.gemfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions gemfiles/ruby_3.3_rails7.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion gemfiles/ruby_3.3_rails71.gemfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions gemfiles/ruby_3.3_rails71.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion gemfiles/ruby_3.4_rails7.gemfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions gemfiles/ruby_3.4_rails7.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion gemfiles/ruby_3.4_rails71.gemfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions gemfiles/ruby_3.4_rails71.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading