Skip to content

Commit ad25ac7

Browse files
authored
Change workflow branch from 'main' to 'master'
1 parent 0e1493d commit ad25ac7

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/sync-idra.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: sync-idra
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the "main" branch
8+
push:
9+
branches: [ "master" ]
10+
pull_request:
11+
branches: [ "master" ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
17+
jobs:
18+
# This workflow contains a single job called "build"
19+
sync-idra-portal:
20+
# The type of runner that the job will run on
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Setup SSH
29+
uses: webfactory/ssh-agent@v0.9.1
30+
with:
31+
ssh-private-key: ${{ secrets.IDRA_KEY }}
32+
33+
- name: Set Git user
34+
run: |
35+
git config --global user.name "github-actions[bot]"
36+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
37+
38+
- name: Set branch name
39+
run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
40+
41+
- name: Clone Idra portal
42+
run: |
43+
cd ..
44+
git clone git@github.com:OPSILab/Idra.git
45+
cd Idra
46+
git submodule update --init --recursive # se non lo hai ancora fatto, ma potrebbe essere superfluo
47+
git submodule update --remote --merge --recursive # per aggiornare il puntatore al commit piu' recente
48+
git add .
49+
git commit -m "Update all submodules"
50+
git push origin master # su IdraPortal il default è master

0 commit comments

Comments
 (0)