Skip to content

Commit c79c722

Browse files
authored
Merge pull request #3885 from hove-io/github-release
ci: allow to release through Github Actions
2 parents caea1ac + 3538a79 commit c79c722

6 files changed

+16
-13
lines changed

.github/workflows/build_navitia_packages_for_release.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Build Navitia Packages For Release
22

33
on:
44
push:
5+
tags:
6+
- '*'
57
branches:
68
- release
79

@@ -80,7 +82,7 @@ jobs:
8082
path: ./builder_from_package
8183
- name: build, create and publish images for branch release
8284
working-directory: builder_from_package
83-
run: ./build.sh -o ${{secrets.access_token_github}} -d debian8 -n -r -e push -t latest -b release -u ${{secrets.docker_user}} -p ${{secrets.docker_password}}
85+
run: ./build.sh -o ${{secrets.access_token_github}} -d debian8 -n -r -e push -t latest -b ${GITHUB_REF_NAME} -u ${{secrets.docker_user}} -p ${{secrets.docker_password}}
8486
- name: slack notification (the job has failed)
8587
if: failure()
8688
run: |

.github/workflows/clang_tidy.yml

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Clang-tidy
22

33
on:
44
push:
5+
tags:
6+
- '*'
57
branches:
68
- clang-tidy
79
- release

.github/workflows/publish_docker_compose_images.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
workflow_dispatch:
55
workflow_run:
66
workflows: ["Build Navitia Packages For Release", "Build Navitia Packages For Dev Multi Distributions"]
7-
branches: [release, dev]
87
types:
98
- completed
109

@@ -21,11 +20,11 @@ jobs:
2120
- name: install httpie dependency
2221
run: sudo apt update && sudo apt install -y httpie
2322
- name: build, create and publish images for branch release
24-
if: ${{ github.event.workflow_run.head_branch == 'release' }}
23+
if: ${{ github.event.workflow_run.name == 'Build Navitia Packages For Release' }}
2524
working-directory: builder_from_package
26-
run: ./build.sh -e push -o ${{secrets.access_token_github}} -t latest -b release -r -u ${{secrets.docker_user}} -p ${{secrets.docker_password}}
25+
run: ./build.sh -e push -o ${{secrets.access_token_github}} -t latest -b ${{ github.event.workflow_run.head_branch }} -r -u ${{secrets.docker_user}} -p ${{secrets.docker_password}}
2726
- name: build, create and publish images for branch dev
28-
if: ${{ github.event.workflow_run.head_branch == 'dev' }}
27+
if: ${{ github.event.workflow_run.name == 'Build Navitia Packages For Dev Multi Distributions' }}
2928
working-directory: builder_from_package
3029
run: ./build.sh -e push -o ${{secrets.access_token_github}} -t dev -b dev -r -u ${{secrets.docker_user}} -p ${{secrets.docker_password}}
3130
- name: slack notification (the job has failed)

.github/workflows/publish_hove_images_aws.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ on:
1818

1919
workflow_run:
2020
workflows: ["Build Navitia Packages For Release", "Build Navitia Packages For Dev Multi Distributions"]
21-
branches: [release, dev]
2221
types:
2322
- completed
2423

@@ -35,13 +34,13 @@ jobs:
3534
then
3635
echo "Workflow triggered due to finished upstream workflow"
3736
echo "::set-output name=branch::${{ github.event.workflow_run.head_branch }}"
38-
if [[ '${{ github.event.workflow_run.head_branch }}' == 'dev' ]]
37+
if [[ '${{ github.event.workflow_run.head_branch }}' == 'release' || '${{ github.event.workflow_run.head_branch }}' =~ v[0-9]+.[0-9]+.[0-9]+ ]]
3938
then
40-
echo "::set-output name=tag::dev"
41-
else :
42-
echo "Realease branch, collecting last version"
39+
echo "Release branch, collecting last version"
4340
VERSION=$(curl https://api.github.com/repos/hove-io/navitia/tags | jq --raw-output '.[0].name')
4441
echo "::set-output name=tag::$VERSION"
42+
else :
43+
echo "::set-output name=tag::dev"
4544
fi
4645
elif [[ '${{ github.event_name }}' == 'workflow_dispatch' ]]
4746
then

.github/workflows/publish_navitia_documentation.yml

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Publish Navitia Documentation
22

33
on:
44
push:
5+
tags:
6+
- '*'
57
branches:
68
- release
79

.github/workflows/workflow.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ name: CI
22

33
on:
44
push:
5+
tags:
6+
- '*'
57
branches:
68
- dev
79
- auto/clang-tidy
810
pull_request:
9-
release:
10-
types:
11-
- created
1211

1312
jobs:
1413
info:

0 commit comments

Comments
 (0)