Skip to content

Commit

Permalink
feat: new dependency bot (Renovate) (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
guidojw authored Dec 9, 2021
1 parent 39e6993 commit 43729ee
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 22 deletions.
41 changes: 41 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"extends": ["config:base", ":disableDependencyDashboard", ":semanticCommits", ":semanticCommitTypeAll(chore)", "helpers:pinGitHubActionDigests"],
"labels": ["dependencies"],
"prConcurrentLimit": 0,
"rangeStrategy": "bump",
"timezone": "Europe/Amsterdam",
"packageRules": [
{
"extends": ["schedule:weekly"],
"matchManagers": ["npm"],
"matchPackagePatterns": ["*"],
"matchUpdateTypes": ["minor", "patch"],
"excludePackageNames": ["yarn"],
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch"
},
{
"matchManagers": ["npm", "dockerfile"],
"matchPackageNames": ["madnificent/ember", "ember-cli", "ember-data", "ember-source"],
"groupName": "Ember.js",
"groupSlug": "ember",
"rangeStrategy": "replace",
"draftPR": true,
"separateMinorPatch": true,
"prBodyNotes": ["{{#unless isPatch}}:warning: Check https://github.com/ember-cli/ember-cli/blob/master/docs/node-support.md if this version comes with new Node.js compatibility and change the Node.js version in `.nvmrc` if so. :warning:{{/unless}}"]
},
{
"matchManagers": ["npm"],
"matchDepTypes": ["engines"],
"enabled": false
},
{
"matchManagers": ["nvm"],
"matchUpdateTypes": ["major"],
"enabled": false
}
],
"docker-compose": {
"enabled": false
}
}
2 changes: 1 addition & 1 deletion .github/workflows/cleanup-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Delete old versions
uses: snok/container-retention-policy@v1
uses: snok/container-retention-policy@455daa39a1817585ad2ef264650d3ff84b1c81d9 # renovate: tag=v1.2.1
with:
image-names: ${{ env.IMAGE_NAMES }}
cut-off: 2 days ago UTC
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
stage: ${{ steps.get_metadata.outputs.stage }}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # renovate: tag=v2.4.0

- name: Get metadata
id: get_metadata
Expand Down Expand Up @@ -82,11 +82,11 @@ jobs:
- name: Checkout code
if: fromJSON(needs.metadata.outputs.has_diff)
uses: actions/checkout@v2
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # renovate: tag=v2.4.0

- name: Run merge
if: fromJSON(needs.metadata.outputs.has_diff)
uses: devmasx/[email protected]
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f # renovate: tag=v1.4.0
with:
type: now
from_branch: staging
Expand Down Expand Up @@ -137,20 +137,20 @@ jobs:
fi
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # renovate: tag=v2.4.0
with:
ref: ${{ needs.merge.outputs.sha }}

- name: Start deployment
uses: bobheadxi/deployments@v0.4.3
uses: bobheadxi/deployments@3288e49ca0bde112b9414f998339321d537e2a51 # renovate: tag=v0.6.1
id: start_deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: ${{ needs.metadata.outputs.stage }}

- name: Deploy
uses: appleboy/[email protected]
uses: appleboy/ssh-action@1d1b21ca96111b1eb4c03c21c14ebb971d2200f6 # renovate: tag=v0.1.4
env:
STAGE: ${{ needs.metadata.outputs.stage }}
with:
Expand All @@ -164,7 +164,7 @@ jobs:
docker-compose up -d
- name: Finalize Sentry release
uses: getsentry/action-release@v1
uses: getsentry/action-release@744e4b262278339b79fb39c8922efcae71e98e39 # renovate: tag=v1.1.6
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_PROJECT: ${{ env.PROJECT_NAME }}
Expand All @@ -173,7 +173,7 @@ jobs:
set_commits: skip

- name: Finish deployment
uses: bobheadxi/deployments@v0.4.3
uses: bobheadxi/deployments@3288e49ca0bde112b9414f998339321d537e2a51 # renovate: tag=v0.6.1
if: steps.start_deployment.conclusion == 'success' && always()
with:
step: finish
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
done
- name: Update Continuous Delivery check run
uses: guidojw/actions/update-check-run@v1
uses: guidojw/actions/update-check-run@fcb92ed90a3965b130f4e5ed3f53df9ef65e6de1 # renovate: tag=v1.0.0
with:
app_id: ${{ env.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # renovate: tag=v2.4.0
with:
ref: ${{ inputs.sha }}

- name: Build test image
uses: guidojw/actions/build-docker-image@v1
uses: guidojw/actions/build-docker-image@fcb92ed90a3965b130f4e5ed3f53df9ef65e6de1 # renovate: tag=v1.0.0
with:
file: Dockerfile.test
name: app
Expand All @@ -32,7 +32,7 @@ jobs:
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # renovate: tag=v2.4.0
with:
ref: ${{ inputs.sha }}

Expand All @@ -42,12 +42,12 @@ jobs:
echo '::add-matcher::.github/problem-matchers/stylelint.json'
- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@04c56d2f954f1e4c69436aa54cfef261a018f458 # renovate: tag=v2.5.0
with:
node-version: '14'

- name: Load test image
uses: guidojw/actions/load-docker-image@v1
uses: guidojw/actions/load-docker-image@fcb92ed90a3965b130f4e5ed3f53df9ef65e6de1 # renovate: tag=v1.0.0
with:
name: app

Expand All @@ -65,7 +65,7 @@ jobs:
needs: build
steps:
- name: Load test image
uses: guidojw/actions/load-docker-image@v1
uses: guidojw/actions/load-docker-image@fcb92ed90a3965b130f4e5ed3f53df9ef65e6de1 # renovate: tag=v1.0.0
with:
name: app

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,24 @@ jobs:
needs: metadata
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # renovate: tag=v2.4.0
with:
ref: ${{ inputs.sha }}
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25 # renovate: tag=v1.6.0

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 # renovate: tag=v1.10.0
with:
registry: ${{ env.REGISTRY_URL }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push image
id: build_push_image
uses: docker/build-push-action@v2
uses: docker/build-push-action@a66e35b9cbcf4ad0ea91ffcaf7bbad63ad9e0229 # renovate: tag=v2.7.0
with:
push: true
context: .
Expand All @@ -94,7 +94,7 @@ jobs:
- name: Create Sentry release
if: ${{ !(github.event_name == 'workflow_dispatch' && github.workflow == 'Publish Image') }}
uses: getsentry/action-release@v1
uses: getsentry/action-release@744e4b262278339b79fb39c8922efcae71e98e39 # renovate: tag=v1.1.6
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_PROJECT: ${{ env.PROJECT_NAME }}
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
done
- name: Update Publish Image check run
uses: guidojw/actions/update-check-run@v1
uses: guidojw/actions/update-check-run@fcb92ed90a3965b130f4e5ed3f53df9ef65e6de1 # renovate: tag=v1.0.0
with:
app_id: ${{ env.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
Expand Down

0 comments on commit 43729ee

Please sign in to comment.