Skip to content
This repository was archived by the owner on Jul 25, 2025. It is now read-only.

Commit 34dd3ca

Browse files
committed
Merge branch 'master' of https://github.com/feedforce/ruby-rpm into support-ruby-3.1
2 parents 64a0dca + ef3a2cd commit 34dd3ca

7 files changed

Lines changed: 301 additions & 24 deletions

File tree

.circleci/config.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ jobs:
5959
- "2.7"
6060
- "3.0"
6161
- "3.1"
62+
- "3.2"
6263
arch:
6364
type: enum
6465
enum:
@@ -75,7 +76,7 @@ jobs:
7576
-t feedforce/ruby-rpm:<< parameters.version >>-builder \
7677
-f Dockerfile-7 \
7778
--target builder \
78-
--cache-from=feedforce/ruby-rpm:centos7 \
79+
--cache-from=ghcr.io/feedforce/ruby-rpm:centos7 \
7980
--build-arg RUBY_X_Y_VERSION=<< parameters.version >> \
8081
--progress plain \
8182
.
@@ -94,7 +95,7 @@ jobs:
9495
-t feedforce/ruby-rpm:<< parameters.version >>-tester \
9596
-f Dockerfile-7 \
9697
--target tester \
97-
--cache-from=feedforce/ruby-rpm:<< parameters.version >>-builder \
98+
--cache-from=ghcr.io/feedforce/ruby-rpm:<< parameters.version >>-builder \
9899
--build-arg RUBY_X_Y_VERSION=<< parameters.version >> \
99100
--progress plain \
100101
.
@@ -133,6 +134,7 @@ jobs:
133134
- "2.7"
134135
- "3.0"
135136
- "3.1"
137+
- "3.2"
136138
docker:
137139
- image: cimg/base:stable
138140
environment:
@@ -178,13 +180,13 @@ workflows:
178180
name: ruby-<< matrix.version >>-centos7-<< matrix.arch >>-build-and-test
179181
matrix:
180182
parameters:
181-
version: ["2.6", "2.7", "3.0", "3.1"]
183+
version: ["2.6", "2.7", "3.0", "3.1", "3.2"]
182184
arch: ["amd64", "arm64"]
183185
- deploy:
184186
name: ruby-<< matrix.version >>-deploy
185187
matrix:
186188
parameters:
187-
version: ["2.6", "2.7", "3.0", "3.1"]
189+
version: ["2.6", "2.7", "3.0", "3.1", "3.2"]
188190
requires:
189191
- ruby-<< matrix.version >>-centos7-amd64-build-and-test
190192
- ruby-<< matrix.version >>-centos7-arm64-build-and-test

.circleci/github-release.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ need_to_release() {
1010
}
1111

1212
get_github_release() {
13-
version=v0.7.5
14-
wget https://github.com/meterup/github-release/releases/download/${version}/linux-amd64-github-release.bz2
13+
version=v0.10.0
14+
wget https://github.com/github-release/github-release/releases/download/${version}/linux-amd64-github-release.bz2
1515
bzip2 -d linux-amd64-github-release.bz2
1616
chmod +x linux-amd64-github-release
1717
mkdir -p $HOME/bin
@@ -38,6 +38,9 @@ $HOME/bin/github-release release \
3838
--description "not release" \
3939
--target master
4040

41+
# Wait a few seconds after create release to avoid to error `could not find the release corresponding to tag ...`.
42+
sleep 5
43+
4144
#
4245
# Upload rpm files and build a release note
4346
#
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: push-docker-image
2+
on:
3+
workflow_dispatch:
4+
jobs:
5+
push-docker-image:
6+
runs-on: ubuntu-latest
7+
permissions:
8+
contents: read
9+
packages: write
10+
env:
11+
REGISTRY: ghcr.io
12+
IMAGE_NAME: ${{ github.repository }}
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: docker/login-action@v2
16+
with:
17+
registry: ${{ env.REGISTRY }}
18+
username: ${{ github.actor }}
19+
password: ${{ github.token }}
20+
- uses: docker/setup-buildx-action@v2
21+
- uses: docker/build-push-action@v4
22+
with:
23+
file: ./Dockerfile-7
24+
target: base
25+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:centos7
26+
platforms: linux/amd64,linux/arm64
27+
push: true
28+
# See: https://github.com/community/community/discussions/45969
29+
provenance: false

README.md

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,20 @@ We create a Pull Request automatically using CircleCI.
2424

2525
This project uses Docker to build RPMs.
2626

27-
The Docker images are hosted at [Docker Hub](https://hub.docker.com/).
27+
The Docker images are hosted at [GitHub Container Registry (ghcr.io)](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry).
2828

29-
- For CentOS 7: [`feedforce/ruby-rpm:centos7`](https://hub.docker.com/r/feedforce/ruby-rpm/)
29+
- For CentOS 7: `ghcr.io/feedforce/ruby-rpm:centos7`
3030

3131
## How to build and push Docker image
3232

33+
Build and push Docker image to ghcr.io from GitHub Actions.
34+
3335
### Manually
3436

35-
You can also build Docker images manually.
36-
37-
```
38-
$ docker login
39-
$ docker buildx create --use
40-
$ docker buildx build \
41-
-t feedforce/ruby-rpm:centos7 \
42-
-f Dockerfile-7 \
43-
--target base \
44-
--build-arg BUILDKIT_INLINE_CACHE=1 \
45-
--platform=linux/amd64,linux/arm64 \
46-
--push \
47-
.
48-
```
37+
Currently, only manual execution using the workflow_dispatch event is supported.
38+
39+
1. Open https://github.com/feedforce/ruby-rpm/actions/workflows/push-docker-image.yml
40+
1. Run workflow with master branch
41+
1. Wait until workflow succeededs
42+
1. Open https://github.com/feedforce/ruby-rpm/pkgs/container/ruby-rpm
43+
1. Check that a new image has been pushed

ruby-2.7.spec

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: ruby
2-
Version: 2.7.5
2+
Version: 2.7.7
33
Release: 1%{?dist}
44
License: Ruby License/GPL - see COPYING
55
URL: http://www.ruby-lang.org/
@@ -67,6 +67,12 @@ rm -rf $RPM_BUILD_ROOT
6767

6868
%changelog
6969

70+
* Thu Nov 24 2022 feedforce tech team <technical_staff@feedforce.jp> - 2.7.7
71+
- Update ruby version to 2.7.7
72+
73+
* Tue Apr 12 2022 feedforce tech team <technical_staff@feedforce.jp> - 2.7.6
74+
- Update ruby version to 2.7.6
75+
7076
* Wed Nov 24 2021 feedforce tech team <technical_staff@feedforce.jp> - 2.7.5
7177
- Update ruby version to 2.7.5
7278

ruby-3.0.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: ruby
2-
Version: 3.0.3
2+
Version: 3.0.4
33
Release: 1%{?dist}
44
License: Ruby License/GPL - see COPYING
55
URL: http://www.ruby-lang.org/
@@ -67,6 +67,9 @@ rm -rf $RPM_BUILD_ROOT
6767

6868
%changelog
6969

70+
* Tue Apr 12 2022 feedforce tech team <technical_staff@feedforce.jp> - 3.0.4
71+
- Update ruby version to 3.0.4
72+
7073
* Wed Nov 24 2021 feedforce tech team <technical_staff@feedforce.jp> - 3.0.3
7174
- Update ruby version to 3.0.3
7275

0 commit comments

Comments
 (0)