-
Notifications
You must be signed in to change notification settings - Fork 35
25 lines (25 loc) · 1.01 KB
/
update-refs.yaml
File metadata and controls
25 lines (25 loc) · 1.01 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
---
name: Update references
on:
push:
branches:
- main
jobs:
update-refs:
name: Update references
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' && github.actor == 'nsmbot' || github.event_name == 'push' && !startsWith(github.event.commits[0].message, '[github-actions]') }}
steps:
- name: Check out the code
uses: actions/checkout@v6
with:
ref: main
- name: Update references
run: |
sed -r -i '/github.com\/networkservicemesh\/deployments-k8s/ s/(\?ref=[a-z0-9.]*)/\?ref='"$GITHUB_SHA"'/g' `grep '?ref=' -rl *`
sed -r -i '/raw.githubusercontent.com\/networkservicemesh\/deployments-k8s/ s/(deployments-k8s\/[a-z0-9.]*)/deployments-k8s\/'"$GITHUB_SHA"'/g' `grep 'raw.githubusercontent.com' -rl *`
git config --global user.email "nsmbot@networkservicmesh.io"
git config --global user.name "nsmbot"
git add -- .
git commit -s -m "Update references"
git push