This repository was archived by the owner on Jun 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.57 KB
/
update-dependencies.yml
File metadata and controls
51 lines (49 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Update Dependencies
on:
workflow_call:
inputs:
jagw_core_ref:
type: string
required: true
protorepo_jagw_go_ref:
type: string
required: true
jobs:
update-dependencies:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: dev
- uses: actions/setup-go@v2
with:
go-version: '1.17.2'
- name: Update dependencies
run: |
go get github.com/jalapeno-api-gateway/jagw-core@${{ inputs.jagw_core_ref }}
go get github.com/jalapeno-api-gateway/protorepo-jagw-go@${{ inputs.protorepo_jagw_go_ref }}
go mod tidy
- name: Create PR for local changes
id: cpr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ github.token }}
commit-message: Update dependencies
committer: GitHub <noreply@github.com>
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
branch: gh-action-temp
base: dev
title: 'Update dependencies'
labels: automerge
- name: Merge PR to dev
uses: "pascalgn/automerge-action@v0.14.3"
env:
GITHUB_TOKEN: "${{ github.token }}"
PULL_REQUEST: "${{ steps.cpr.outputs.pull-request-number }}"
- name: Delete temp branch if it exists
if: steps.cpr.outputs.pull-request-number != ''
uses: dawidd6/action-delete-branch@v3
with:
github_token: ${{ github.token }}
branches: gh-action-temp