Refactoring logic and intro Github Actions (#26)

* Refactoring logic

- Modify all dockerfile files, unified replacement logic
- Fix `perl` required error.
- Add ignore file
- Fix CentOS 5 support, by change mirror from
  `http://archive.kernel.org` to `http://linuxsoft.cern.ch`

* Update README.md

- Add a short usage for docker

* Create Github Actions

- Add `build-images.yml` to auto build docker images. Support: CentOS 7/6/5, CentOS Stream 8/9, Amazon Linux 1/2/2023.

- Add `create-amd64-release.yml` to auto create amd64 release files.

- Add `create-arm64-release.yml` to auto create arm64 release files.

- Reformat release comment

Features:

- Using batch build and batch compile

- Using latest action version
This commit is contained in:
ChowRex
2024-07-23 14:08:11 +08:00
committed by GitHub
parent 22c93f527d
commit 7c83502a8c
10 changed files with 909 additions and 68 deletions

View File

@@ -97,10 +97,39 @@ If still not satisfied, you may try the final wepon: FORCED INSTALL.
rpm -ivh --force --nodeps --replacepkgs --replacefiles openssh-*.rpm
```
## Use Docker
See file `docker.README.md`
### TL;DR
```bash
# Define output directory
OUTPUT="/tmp/openssh-rpms"
# Specify build os and versions
declare -A MAPPING
MAPPING["amazonlinux2023"]="amzn2023"
MAPPING["amazonlinux2"]="amzn2"
MAPPING["amazonlinux1"]="amzn1"
MAPPING["centos-stream9"]="el7"
MAPPING["centos-stream8"]="el7"
MAPPING["centos7"]="el7"
MAPPING["centos6"]="el6"
# CentOS 5 is NOT valid.
# MAPPING["centos5"]="el5"
for VERSION in "${!MAPPING[@]}";
do
DIST=${MAPPING[$VERSION]}
echo "Create for OS: ${VERSION}"
mkdir -p $OUTPUT/$VERSION
# Run the builder container
docker run -it --rm \
-v $OUTPUT/$VERSION:/data/$DIST/RPMS \
chowrex/openssh-rpms:$VERSION
done
```
For more details, see file `docker.README.md`
## Security Notes