Skip to content

Commit d5a9701

Browse files
authored
ci: Update GH Actions to Ubuntu 24.04 and switch from release tags to hashes (#739)
1 parent 6ec1b29 commit d5a9701

File tree

5 files changed

+48
-45
lines changed

5 files changed

+48
-45
lines changed

.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
needs: ansible-lint
4139
env:
4240
AGENT_DATA_PLANE_KEY: ${{ secrets.AGENT_DATA_PLANE_KEY }}
@@ -69,7 +67,7 @@ jobs:
6967
steps:
7068
- name: Check out the codebase
7169
if: ${{ !(contains(matrix.scenario, 'plus')) || (env.NGINX_CRT != 0 && env.NGINX_KEY != 0) }}
72-
uses: actions/checkout@v4
70+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
7371

7472
# - name: Set up Docker QEMU
7573
# if: ${{ !(contains(matrix.scenario, 'plus')) || (env.NGINX_CRT != 0 && env.NGINX_KEY != 0) }}
@@ -79,11 +77,11 @@ jobs:
7977

8078
- name: Set up Python 3
8179
if: ${{ !(contains(matrix.scenario, 'plus')) || (env.NGINX_CRT != 0 && env.NGINX_KEY != 0) }}
82-
uses: actions/setup-python@v5
80+
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
8381
with:
8482
python-version: 3.x
8583

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

.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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ FEATURES:
1111

1212
- Add support for installing NGINX Open Source on Alpine Linux 3.20.
1313

14+
CI/CD:
15+
16+
- Update GitHub Actions to Ubuntu 24.04.
17+
- Switch GitHub Actions from using tags to release hashes.
18+
1419
## 0.24.3 (July 11, 2024)
1520

1621
DEPRECATION WARNINGS:

0 commit comments

Comments
 (0)