Skip to content

Commit 659c614

Browse files
authored
ci: Update GH Actions to Ubuntu 24.04 and switch from release tags to hashes (#446)
1 parent 70f23ba commit 659c614

File tree

6 files changed

+47
-47
lines changed

6 files changed

+47
-47
lines changed

.github/workflows/f5-cla.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212

1313
jobs:
1414
f5-cla:
15-
runs-on: ubuntu-22.04
15+
runs-on: ubuntu-24.04
1616
steps:
1717
- name: Run F5 CLA assistant
1818
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have hereby read the F5 CLA and agree to its terms') || github.event_name == 'pull_request_target'

.github/workflows/galaxy.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
---
2-
name: Ansible Galaxy import
2+
name: Ansible Galaxy Role Import
33
on:
44
release:
5-
types:
6-
- published
5+
types: [published]
76
workflow_dispatch:
7+
permissions: read-all
88
jobs:
9-
galaxy:
10-
name: Galaxy
11-
runs-on: ubuntu-22.04
9+
ansible-galaxy:
10+
name: Import role to Ansible Galaxy
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- name: Check out the codebase
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
1515

1616
- name: Set up Python 3
17-
uses: actions/setup-python@v5
17+
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
1818
with:
1919
python-version: 3.x
2020

21-
- name: Install Ansible
21+
- name: Install Ansible core
2222
run: pip3 install -r .github/workflows/requirements/requirements_galaxy.txt
2323

24-
- name: Import release to Ansible Galaxy
24+
- name: Import role releases to Ansible Galaxy
2525
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)

.github/workflows/molecule.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,39 @@
22
name: Molecule CI/CD
33
on:
44
pull_request:
5-
branches:
6-
- main
5+
branches: [main]
76
push:
8-
branches:
9-
- main
10-
tags-ignore:
11-
- "**"
7+
branches: [main]
8+
tags-ignore: ["**"]
129
schedule:
1310
- cron: "0 0 1 * *"
1411
workflow_dispatch:
12+
permissions: read-all
1513
jobs:
1614
ansible-lint:
1715
name: Ansible Lint
18-
runs-on: ubuntu-22.04
16+
runs-on: ubuntu-24.04
1917
steps:
2018
- name: Check out the codebase
21-
uses: actions/checkout@v4
19+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2220

2321
- name: Set up Python 3
24-
uses: actions/setup-python@v5
22+
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
2523
with:
2624
python-version: 3.x
2725

28-
- name: Install Ansible Lint
26+
- name: Install Ansible core and Ansible Lint
2927
run: pip3 install -r .github/workflows/requirements/requirements_ansible_lint.txt
3028

31-
- name: Install Ansible collection dependencies
29+
- name: Install Ansible core collection dependencies
3230
run: ansible-galaxy install -r .github/workflows/requirements/requirements_ansible.yml
3331

3432
- name: Run Ansible Lint
3533
run: ansible-lint --force-color
3634

3735
molecule:
3836
name: Molecule
39-
runs-on: ubuntu-22.04
37+
runs-on: ubuntu-24.04
4038
env:
4139
NGINX_CRT: ${{ secrets.NGINX_CRT }}
4240
NGINX_KEY: ${{ secrets.NGINX_KEY }}
@@ -57,15 +55,15 @@ jobs:
5755
steps:
5856
- name: Check out the codebase
5957
if: ${{ !(contains(matrix.scenario, 'plus')) || (env.NGINX_CRT != 0 && env.NGINX_KEY != 0) }}
60-
uses: actions/checkout@v4
58+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
6159

6260
- name: Set up Python 3
6361
if: ${{ !(contains(matrix.scenario, 'plus')) || (env.NGINX_CRT != 0 && env.NGINX_KEY != 0) }}
64-
uses: actions/setup-python@v5
62+
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
6563
with:
6664
python-version: 3.x
6765

68-
- name: Install Molecule dependencies
66+
- name: Install Ansible core and Molecule
6967
if: ${{ !(contains(matrix.scenario, 'plus')) || (env.NGINX_CRT != 0 && env.NGINX_KEY != 0) }}
7068
run: pip3 install -r .github/workflows/requirements/requirements_molecule.txt
7169

.github/workflows/release-drafter.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Release Drafter
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request_target:
7+
types: [opened, reopened, synchronize]
8+
permissions: read-all
9+
jobs:
10+
release-draft:
11+
name: Update release draft
12+
runs-on: ubuntu-24.04
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
steps:
17+
- name: Run release drafter
18+
uses: release-drafter/release-drafter@3f0f87098bd6b5c5b9a36d49c41d998ea58f9348 # v6.0.0
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ BUG FIXES:
88

99
TESTS:
1010

11+
- Add Molecule tests covering common NGINX use cases (web server, reverse proxy), enabling the NGINX stub status metrics, and NGINX Plus API and live metrics dashboard.
1112
- Update the platforms used in the various Molecule scenarios.
1213
- Use the local role name (`ansible-role-nginx-config`) instead of the fully qualified role name (`nginxinc.nginx_config`) in Molecule to ensure tests always work as intended in environments where the role has been already installed beforehand.
13-
- Add Molecule tests covering common NGINX use cases (web server, reverse proxy), enabling the NGINX stub status metrics, and NGINX Plus API and live metrics dashboard.
14+
- Update GitHub Actions to Ubuntu 24.04.
15+
- Switch GitHub Actions from using tags to release hashes.
1416

1517
MAINTENANCE:
1618

0 commit comments

Comments
 (0)