gha_config 0.16 → 0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/CI.yml +0 -25
- data/CHANGELOG.md +3 -0
- data/README.md +11 -0
- data/lib/gha_config/version.rb +1 -1
- data/lib/gha_config/writer.rb +5 -2
- metadata +2 -3
- data/.github/workflow-src +0 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '09d6f4522cd5ee962dab579769563ebe5eb98e41f7183876f8886bc3053a2f9a'
|
|
4
|
+
data.tar.gz: e2dbb45afde2fa01072ca64069a51444107173ee3b4bef3c32e5d1ede11e746c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ca61e7d7ac283a1dfd92ba763460f9ca996076d8f4c6811a38da694b7616242cba4d00930fa9b0415b5f1b2b09184b7a1538ecbbd87763024fdaacfc73cca137
|
|
7
|
+
data.tar.gz: fdcb23e50ef4d9906f75490d2306061671317c37d7e92b6e75e6d1d53f6fbc3d63e24a6f9067fe74d195c3205af0249f23421f83fc6f3ef4075166b19d0d7370
|
data/.github/workflows/CI.yml
CHANGED
|
@@ -41,28 +41,3 @@ jobs:
|
|
|
41
41
|
run: |
|
|
42
42
|
sudo chmod 1777 -R /home/circleci/.bundle && bundle config path 'vendor/bundle' && bundle install --jobs=4
|
|
43
43
|
|
|
44
|
-
deploy-gem:
|
|
45
|
-
runs-on: [ubuntu, runner-fleet]
|
|
46
|
-
needs: [build]
|
|
47
|
-
container:
|
|
48
|
-
image: ghcr.io/wishabi/ci-build-environment:ruby-3.0-buster
|
|
49
|
-
credentials:
|
|
50
|
-
username: ${{ github.repository_owner }}
|
|
51
|
-
password: ${{ secrets.GHCR_TOKEN }}
|
|
52
|
-
if: github.ref == 'refs/heads/main'
|
|
53
|
-
steps:
|
|
54
|
-
- name: Checkout code
|
|
55
|
-
uses: actions/checkout@v2
|
|
56
|
-
- name: Bundle cache
|
|
57
|
-
uses: actions/cache@v1
|
|
58
|
-
with:
|
|
59
|
-
path: vendor/bundle
|
|
60
|
-
key: rails-{{ arch }}-{{ checksum "Gemfile.lock" }}
|
|
61
|
-
restore-keys: rails-{{ arch }}-
|
|
62
|
-
- name: Bundle install
|
|
63
|
-
run: |
|
|
64
|
-
sudo chmod 1777 -R /home/circleci/.bundle && bundle config path 'vendor/bundle' && bundle install --jobs=4
|
|
65
|
-
- name: Deploy to production
|
|
66
|
-
run: |
|
|
67
|
-
chmod +x ./deploy/artifactory.sh && ./deploy/artifactory.sh
|
|
68
|
-
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.17] - 2021-08-04
|
|
9
|
+
- Adds submodules to checkout action
|
|
10
|
+
|
|
8
11
|
## [0.16] - 2021-07-27
|
|
9
12
|
- Remove dependency on activesupport and byebug
|
|
10
13
|
- Auto-create directory if it doesn't exist
|
data/README.md
CHANGED
|
@@ -131,6 +131,17 @@ Templates get expanded into their contents whenever they are used. Templates can
|
|
|
131
131
|
|
|
132
132
|
If you're using Ruby, you can add this gem to your app Gemfile. Otherwise, you can install it locally. Either way, you can re-run it whenever your "source workflow" changes.
|
|
133
133
|
|
|
134
|
+
### Notes on checkout Step
|
|
135
|
+
A checkout step is added to every job in the workflow. This looks like below
|
|
136
|
+
```
|
|
137
|
+
- name: Checkout code
|
|
138
|
+
uses: actions/checkout@v2
|
|
139
|
+
with:
|
|
140
|
+
token: ${{ secrets.FLIPPCIRCLECIPULLER_REPO_TOKEN || github.token }}
|
|
141
|
+
submodules: recursive
|
|
142
|
+
```
|
|
143
|
+
The submodules are fetched ONLY by adding the `FLIPPCIRCLECIPULLER_REPO_TOKEN` in github repo secrets.
|
|
144
|
+
|
|
134
145
|
## Contributing
|
|
135
146
|
|
|
136
147
|
Pull requests are welcome!
|
data/lib/gha_config/version.rb
CHANGED
data/lib/gha_config/writer.rb
CHANGED
|
@@ -48,8 +48,11 @@ module GhaConfig
|
|
|
48
48
|
}})
|
|
49
49
|
job['steps'].unshift({
|
|
50
50
|
'name' => 'Checkout code',
|
|
51
|
-
'uses' => 'actions/checkout@v2'
|
|
52
|
-
|
|
51
|
+
'uses' => 'actions/checkout@v2',
|
|
52
|
+
'with' => {
|
|
53
|
+
'token' => "${{ secrets.FLIPPCIRCLECIPULLER_REPO_TOKEN || github.token }}",
|
|
54
|
+
'submodules' => 'recursive'
|
|
55
|
+
}})
|
|
53
56
|
job['needs'] = "[#{job['needs'].join(', ')}]" if job['needs'].is_a?(Array)
|
|
54
57
|
new_job.merge!(job)
|
|
55
58
|
output_hash['jobs'][name] = new_job
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gha_config
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: '0.
|
|
4
|
+
version: '0.17'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Orner
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-08-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rubocop
|
|
@@ -32,7 +32,6 @@ executables:
|
|
|
32
32
|
extensions: []
|
|
33
33
|
extra_rdoc_files: []
|
|
34
34
|
files:
|
|
35
|
-
- ".github/workflow-src"
|
|
36
35
|
- ".github/workflows/CI.yml"
|
|
37
36
|
- ".gitignore"
|
|
38
37
|
- ".rubocop.yml"
|