Compare commits
71 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f3d75c010 | ||
|
|
718926c776 | ||
|
|
21129c90a8 | ||
|
|
61d3055e77 | ||
|
|
4c44f1682f | ||
|
|
ead4715425 | ||
|
|
ceb331236f | ||
|
|
efb5140d5b | ||
|
|
675e60a9d3 | ||
|
|
eda31c222d | ||
|
|
85bb6c2ad2 | ||
|
|
ecd72cb678 | ||
|
|
56c654ac50 | ||
|
|
d8676bfa36 | ||
|
|
bce25f7840 | ||
|
|
32a0c2d240 | ||
|
|
fda37b8b20 | ||
|
|
62a110b9b1 | ||
|
|
9bbad99e57 | ||
|
|
73b1427fe6 | ||
|
|
5f8f59f8b5 | ||
|
|
158d42185e | ||
|
|
f208079d80 | ||
|
|
b32cfcd4c1 | ||
|
|
831ab5452e | ||
|
|
d3e906333b | ||
|
|
02ebb22b5a | ||
|
|
a05c54d862 | ||
|
|
adbb090758 | ||
|
|
bde82421b1 | ||
|
|
58cb94d8d4 | ||
|
|
703de123ea | ||
|
|
b1a34c5b71 | ||
|
|
ad6f741613 | ||
|
|
abd52ae85f | ||
|
|
9f2549569f | ||
|
|
08ef161dcd | ||
|
|
217783cbeb | ||
|
|
81b25a482c | ||
|
|
7218563dcc | ||
|
|
3f0dc2af7d | ||
|
|
ad66f55ffd | ||
|
|
fd89c050b1 | ||
|
|
30f525889f | ||
|
|
32fad6292a | ||
|
|
51293fc950 | ||
|
|
105c7b63b8 | ||
|
|
cd84774afe | ||
|
|
5cfaa219dc | ||
|
|
e03daf890f | ||
|
|
661be6f0a8 | ||
|
|
995b6b0321 | ||
|
|
049d17ca06 | ||
|
|
66d2350520 | ||
|
|
3a78eca719 | ||
|
|
7b2e621012 | ||
|
|
245488cec8 | ||
|
|
6c025bf199 | ||
|
|
0162a94483 | ||
|
|
de91d72e3d | ||
|
|
deca7afc45 | ||
|
|
816e1398fa | ||
|
|
92a70bacf6 | ||
|
|
e4b96f96cd | ||
|
|
34546ec054 | ||
|
|
249f1d8280 | ||
|
|
39fa9a1fc3 | ||
|
|
0b560de388 | ||
|
|
c084c9c0ab | ||
|
|
be3fe5d27f | ||
|
|
c7e2a7869d |
88
.github/workflows/exp.yml
vendored
Normal file
88
.github/workflows/exp.yml
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
|
||||
name: Experiment
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
|
||||
experiment:
|
||||
name: Experiment
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Experiment
|
||||
uses: zpqrtbnk/gh-actions/experiment@master
|
||||
|
||||
- name: Infos
|
||||
shell: bash
|
||||
run: |
|
||||
echo "github.ref: '${{ github.ref }}'"
|
||||
echo "github.sha: '${{ github.sha }}'"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
fetch-depth: 2 # get parent
|
||||
|
||||
- name: Report
|
||||
shell: bash
|
||||
run: |
|
||||
set +e
|
||||
git log --graph --pretty=format':%h%%d %s %an, %ar' | head -n 5
|
||||
echo "--"
|
||||
REF="${{ github.ref }}"
|
||||
BRANCH=${REF#refs/heads/}
|
||||
|
||||
if [ "$BRANCH" != "$REF" ]; then
|
||||
VERSION=${BRANCH#release/}
|
||||
if [ "$VERSION" != "$BRANCH" ]; then
|
||||
echo "Triggered by commit in version $VERSION release branch $BRANCH"
|
||||
git fetch origin refs/tags/v$VERSION:refs/tags/v$VERSION
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Tag v$VERSION does not exist"
|
||||
else
|
||||
TAGSHA=$(git rev-parse v$VERSION)
|
||||
echo "FOUND TAG $TAGSHA"
|
||||
if [ "$TAGSHA" != "${{ github.sha }}" ]; then
|
||||
echo "::error::TAG v$VERSION exists on another commit (${{ github.sha }}) : error"
|
||||
exit 1
|
||||
else
|
||||
echo "Tag v$VERSION exists on this commit: nothing to do here"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "::error::Triggered by commit in non-release branch $BRANCH: error"
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
HZTAG=${REF#refs/tags/}
|
||||
if [ "$HZTAG" != "$REF" ]; then
|
||||
HZVERSION=${HZTAG#v}
|
||||
if [ "$HZVERSION" != "$HZTAG" ]; then # it is a version tag
|
||||
echo "Triggered by version tag $HZTAG"
|
||||
git fetch origin refs/heads/release/$HZVERSION:refs/heads/release/$HZVERSION
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "::error::Branch release/$HZVERSION does not exist"
|
||||
exit 1
|
||||
else
|
||||
HZBRANCHSHA=$(git rev-parse release/$HZVERSION)
|
||||
HZPARENTSHA=$(git rev-parse $HZTAG^1)
|
||||
if [ "$HZBRANCHSHA" != "$HZPARENTSHA" ]; then
|
||||
echo "::error::Tag parent is not HEAD of release/$HZVERSION but $HZPARENTSHA"
|
||||
exit 1
|
||||
else
|
||||
echo "Tag parent is HEAD of release/$HZVERSION, proceed"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "::error::Triggered by non-version tag $HZTAG"
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "::error::I am confused"
|
||||
exit 1
|
||||
4
rigolo.txt
Normal file
4
rigolo.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
premier
|
||||
|
||||
deuxieme
|
||||
|
||||
0
second.txt
Normal file
0
second.txt
Normal file
0
treize.txt
Normal file
0
treize.txt
Normal file
3
trente.txt
Normal file
3
trente.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
premiers
|
||||
|
||||
deuxiemes
|
||||
Reference in New Issue
Block a user