Skip to content

Commit

Permalink
Dependabot and mergify configuration for Gh actions (#965)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuthan committed Nov 24, 2022
1 parent bd2e3c6 commit 88731e0
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
#
# Prototype for node ecosystem, needs to be configured
#
# - package-ecosystem: "npm"
# directory: "/"
# schedule:
# interval: "daily"
# allow:
# # allow only production updates
# - dependency-name: "*"
# dependency-type: "production"
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,9 @@ jobs:
needs: required-checks
uses: ./.github/workflows/reports.yml
secrets: inherit

all-checks:
needs: [required-checks, deploy, reports]
runs-on: ubuntu-latest
steps:
- run: exit 0
4 changes: 3 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
if: github.repository == 'allegro/turnilo'

env:
IMAGE_NAME: eu.gcr.io/${{ secrets.GCP_PROJECT_ID }}/turnilo
TAG_NAME: ${{ github.head_ref || 'latest' }}

steps:
Expand All @@ -24,6 +23,9 @@ jobs:
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}

- name: Set Docker image name
run: echo "IMAGE_NAME=eu.gcr.io/$GCP_PROJECT/turnilo" >> $GITHUB_ENV

- name: Configure Docker
run: gcloud auth configure-docker --quiet

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/undeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
if: github.repository == 'allegro/turnilo'

env:
IMAGE_NAME: eu.gcr.io/${{ secrets.GCP_PROJECT_ID }}/turnilo
TAG_NAME: ${{ github.head_ref }}

steps:
Expand All @@ -25,6 +24,9 @@ jobs:
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}

- name: Set Docker image name
run: echo "IMAGE_NAME=eu.gcr.io/$GCP_PROJECT/turnilo" >> $GITHUB_ENV

- name: Undeploy app
run: |
gcloud run services delete turnilo-${TAG_NAME//[^a-z0-9]/-} \
Expand Down
19 changes: 19 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
pull_request_rules:
- name: automatic merge for GitHub actions
conditions:
- author=dependabot[bot]
- check-success=all-checks # check all actions
- label=github-actions # label assigned by dependabot
- base=master
actions:
merge:
method: rebase
- name: automatic merge for Node dependencies
conditions:
- author=dependabot[bot]
- check-success=required-checks # check required actions only
- label=npm # label assigned by dependabot
- base=master
actions:
merge:
method: rebase
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
; dependencies saved to package.json will be configured with an exact version rather than using npm's default semver range operator
save-exact=true
; stop 'npm install' from sending an audit report
audit = false

0 comments on commit 88731e0

Please sign in to comment.