Skip to content

Commit c1ae4ce

Browse files
committed
Use upstream action to download releases info
1 parent 14b9c0e commit c1ae4ce

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

.github/workflows/update-supported-enterprise-server-versions.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@ jobs:
2222
python-version: "3.7"
2323
- name: Checkout CodeQL Action
2424
uses: actions/checkout@v4
25-
- name: Checkout Enterprise Releases
26-
uses: actions/checkout@v4
27-
with:
28-
repository: github/enterprise-releases
29-
ssh-key: ${{ secrets.ENTERPRISE_RELEASES_SSH_KEY }}
30-
path: ${{ github.workspace }}/enterprise-releases/
25+
- name: Get Enterprise Server Versions
26+
id: get-versions
27+
uses: github/enterprise-releases/actions/maintained_features@master
3128
- name: Update Supported Enterprise Server Versions
3229
run: |
3330
cd ./.github/workflows/update-supported-enterprise-server-versions/
@@ -37,7 +34,7 @@ jobs:
3734
rm --recursive "$ENTERPRISE_RELEASES_PATH"
3835
npm run build
3936
env:
40-
ENTERPRISE_RELEASES_PATH: ${{ github.workspace }}/enterprise-releases/
37+
MAINTAINED_RELEASES: ${{ steps.get-versions.outputs.maintained_releases }}
4138

4239
- name: Update git config
4340
run: |

.github/workflows/update-supported-enterprise-server-versions/update.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@
77
import semver
88

99
_API_COMPATIBILITY_PATH = pathlib.Path(__file__).absolute().parents[3] / "src" / "api-compatibility.json"
10-
_ENTERPRISE_RELEASES_PATH = pathlib.Path(os.environ["ENTERPRISE_RELEASES_PATH"])
11-
_RELEASE_FILE_PATH = _ENTERPRISE_RELEASES_PATH / "releases.json"
1210
_FIRST_SUPPORTED_RELEASE = semver.VersionInfo.parse("2.22.0") # Versions older than this did not include Code Scanning.
1311

1412
def main():
1513
api_compatibility_data = json.loads(_API_COMPATIBILITY_PATH.read_text())
1614

17-
releases = json.loads(_RELEASE_FILE_PATH.read_text())
15+
releases = json.loads(os.environ["MAINTAINED_RELEASES"])
1816

1917
# Remove GHES version using a previous version numbering scheme.
2018
if "11.10" in releases:

0 commit comments

Comments
 (0)