-
Notifications
You must be signed in to change notification settings - Fork 5
88 lines (86 loc) · 2.47 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Release
on:
push:
tags:
- 'v*'
jobs:
release-buildbox:
strategy:
fail-fast: false
matrix:
dist:
- el8
- el9
- amzn2023
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
- debian-12
arch:
- x86_64
- aarch64
- ppc64le
exclude:
- dist: amzn2023
arch: ppc64le
- dist: ubuntu-20.04
arch: ppc64le
- dist: ubuntu-22.04
arch: ppc64le
- dist: ubuntu-24.04
arch: ppc64le
- dist: debian-12
arch: ppc64le
name: Release buildbox
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Setup Ruby using Bundler
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0.4'
bundler: '2.1.4'
bundler-cache: true
- name: setup the environment
run: echo "OOD_PACKAGING_BUILD_BOX_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: docker build and tag
run: bundle exec rake ood_packaging:buildbox:build[${{ matrix.dist }},${{ matrix.arch }}]
- name: login to dockerhub
run: docker login -u ${{ secrets.OSC_ROBOT_DOCKERHUB_USER }} -p ${{ secrets.OSC_ROBOT_DOCKERHUB_TOKEN }}
- name: push images to dockerhub
run: bundle exec rake ood_packaging:buildbox:push[${{ matrix.dist }},${{ matrix.arch }}]
release-gem:
needs: [release-buildbox]
name: Release gem
runs-on: ubuntu-latest
steps:
- name: Set version
run: |
VERSION=${GITHUB_REF#refs/*/v}
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: checkout
uses: actions/checkout@v4
- name: Setup Ruby using Bundler
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0.4'
bundler: '2.1.4'
bundler-cache: true
- name: Setup Rubygems credentials
run: |
set +x
mkdir -p ~/.gem
cat << EOF > ~/.gem/credentials
---
:rubygems_api_key: ${{ secrets.OSC_ROBOT_RUBYGEMS_TOKEN }}
EOF
chmod 0600 ~/.gem/credentials
- name: Publish gem
run: |
bundle exec rake build
gem push pkg/ood_packaging-${{ env.VERSION }}.gem