-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
40 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
gemfile: | ||
# Files that declare the dependency tree | ||
- Gemfile | ||
- Appraisals | ||
- datadog.gemspec | ||
# Files that control gemfile generation | ||
- tasks/appraisal.rake | ||
- .github/workflows/lock-dependency.yml | ||
# The gem version is present in all lock files | ||
- lib/datadog/version.rb | ||
# In case the generated files were updated manually or in a merge commit | ||
- appraisal/** | ||
- gemfiles/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,37 @@ | ||
name: Lock Dependency | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: 'Branch to be lock dependency' | ||
required: true | ||
# Testing purpose, to be removed before merge. | ||
push: | ||
branches: | ||
- tonycthsu/automate-update-gemfiles | ||
|
||
# Ensure obsolete job is cancelled if another commit is pushed to the same branch. | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
# TODO: In order to fully automate this workflow for each PR, | ||
# have a reliable way to precheck job to understand whether it need to be updated | ||
changes: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Only execute if there's a PR attached to this branch. | ||
# Because we execute on `push`, we have to double check here if this is part of a PR. | ||
- name: Check if this branch is attached to a Pull Request | ||
uses: 8BitJonny/[email protected] | ||
id: pr | ||
with: | ||
filterOutClosed: true # Don't trigger on commits with closed PRs, including merges into `master`. | ||
- if: steps.pr.outputs.pr_found == 'true' | ||
uses: actions/checkout@v4 | ||
# And also, only execute if files that can affect gemfiles are modified. | ||
- if: steps.pr.outputs.pr_found == 'true' | ||
uses: dorny/paths-filter@v3 | ||
id: filter | ||
with: | ||
base: ${{ github.ref_name }} | ||
filters: .github/filters.yaml | ||
lock: | ||
runs-on: ubuntu-latest | ||
needs: changes | ||
if: ${{ needs.changes.outputs.gemfile == 'true' }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -42,12 +53,12 @@ jobs: | |
version: '2.6' | ||
- name: ruby | ||
version: '2.5' | ||
- name: jruby | ||
version: '9.4' | ||
- name: jruby | ||
version: '9.3' | ||
- name: jruby | ||
version: '9.2' | ||
# - 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 }} | ||
env: | ||
|