File tree 2 files changed +3
-31
lines changed
2 files changed +3
-31
lines changed Original file line number Diff line number Diff line change 43
43
runs-on : ubuntu-latest
44
44
outputs :
45
45
prowler_version_major : ${{ steps.get-prowler-version.outputs.PROWLER_VERSION_MAJOR }}
46
- prowler_version : ${{ steps.update -prowler-version.outputs.PROWLER_VERSION }}
46
+ prowler_version : ${{ steps.get -prowler-version.outputs.PROWLER_VERSION }}
47
47
env :
48
48
POETRY_VIRTUALENVS_CREATE : " false"
49
49
65
65
id : get-prowler-version
66
66
run : |
67
67
PROWLER_VERSION="$(poetry version -s 2>/dev/null)"
68
+ echo "PROWLER_VERSION=${PROWLER_VERSION}" >> "${GITHUB_ENV}"
69
+ echo "PROWLER_VERSION=${PROWLER_VERSION}" >> "${GITHUB_OUTPUT}"
68
70
69
71
# Store prowler version major just for the release
70
72
PROWLER_VERSION_MAJOR="${PROWLER_VERSION%%.*}"
89
91
;;
90
92
esac
91
93
92
- - name : Update Prowler version (release)
93
- id : update-prowler-version
94
- if : github.event_name == 'release'
95
- run : |
96
- PROWLER_VERSION="${{ github.event.release.tag_name }}"
97
- poetry version "${PROWLER_VERSION}"
98
- echo "PROWLER_VERSION=${PROWLER_VERSION}" >> "${GITHUB_ENV}"
99
- echo "PROWLER_VERSION=${PROWLER_VERSION}" >> "${GITHUB_OUTPUT}"
100
-
101
94
- name : Login to DockerHub
102
95
uses : docker/login-action@v3
103
96
with :
Original file line number Diff line number Diff line change @@ -40,18 +40,13 @@ jobs:
40
40
- name : Install dependencies
41
41
run : |
42
42
pipx install poetry
43
- pipx inject poetry poetry-bumpversion
44
43
45
44
- name : Setup Python
46
45
uses : actions/setup-python@v5
47
46
with :
48
47
python-version : ${{ env.PYTHON_VERSION }}
49
48
cache : ${{ env.CACHE }}
50
49
51
- - name : Update Poetry and config version
52
- run : |
53
- poetry version ${{ env.RELEASE_TAG }}
54
-
55
50
- name : Import GPG key
56
51
uses : crazy-max/ghaction-import-gpg@v6
57
52
with :
60
55
git_user_signingkey : true
61
56
git_commit_gpgsign : true
62
57
63
- - name : Push updated version to the release tag
64
- run : |
65
- # Configure Git
66
- git config user.name "github-actions"
67
- git config user.email "${{ env.GIT_COMMITTER_EMAIL }}"
68
-
69
- # Add the files with the version changed
70
- git add prowler/config/config.py pyproject.toml
71
- git commit -m "chore(release): ${{ env.RELEASE_TAG }}" --no-verify -S
72
-
73
- # Replace the tag with the version updated
74
- git tag -fa ${{ env.RELEASE_TAG }} -m "chore(release): ${{ env.RELEASE_TAG }}" --sign
75
-
76
- # Push the tag
77
- git push -f origin ${{ env.RELEASE_TAG }}
78
-
79
58
- name : Build Prowler package
80
59
run : |
81
60
poetry build
You can’t perform that action at this time.
0 commit comments