Skip to content

Commit

Permalink
Merge pull request #34 from moonlibs/override-config
Browse files Browse the repository at this point in the history
Provide override-config rockspecs
  • Loading branch information
ochaton authored Apr 17, 2024
2 parents 687b01a + 0521fb6 commit cd0bf83
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/push-rockspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@master
- uses: tarantool/setup-tarantool@v2
- uses: tarantool/setup-tarantool@v3
with:
tarantool-version: '2.6'

Expand All @@ -25,6 +25,10 @@ jobs:
- run: tarantoolctl rocks new_version --tag=${{ env.TAG }} rockspecs/config-scm-5.rockspec ${{ env.TAG }} "git+https://github.com/${{ github.repository }}.git"
- run: tarantoolctl rocks --server https://moonlibs.github.io/rocks install ${{ env.ROCK_NAME }}-${{ env.TAG }}-1.rockspec
- run: tarantoolctl rocks pack ${{ env.ROCK_NAME }}-${{ env.TAG }}-1.rockspec

- run: tarantoolctl rocks new_version --tag=${{ env.TAG }} override-config-dev-1.rockspec ${{ env.TAG }} "git+https://github.com/${{ github.repository }}.git"
- run: tarantoolctl rocks --server https://moonlibs.github.io/rocks install override-config-${{ env.TAG }}-1.rockspec
- run: tarantoolctl rocks pack override-config-${{ env.TAG }}-1.rockspec
# Install native lua with luarocks
- uses: leafo/gh-actions-lua@v9
with:
Expand All @@ -33,11 +37,11 @@ jobs:
with:
luarocksVersion: "3.8.0"
- uses: unfor19/[email protected]
- run: mkdir .build && cp ${{env.ROCK_NAME}}-dev-1.rockspec ${{env.ROCK_NAME}}-${{env.TAG}}-1.rockspec .build/ && cp *.src.rock .build/
- run: mkdir .build && cp ${{env.ROCK_NAME}}-dev-1.rockspec ${{env.ROCK_NAME}}-${{env.TAG}}-1.rockspec ${{env.ROCK_NAME}}-${{env.TAG}}-1.src.rock .build/
- name: rebuild and publish s3 luarocks server
env:
AWS_ACCESS_KEY_ID: ${{ secrets.MOONLIBS_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.MOONLIBS_S3_SECRET_KEY}}
AWS_SECRET_ACCESS_KEY: ${{ secrets.MOONLIBS_S3_SECRET_KEY }}
AWS_EC2_METADATA_DISABLED: true
run: |
cd .build && aws s3 sync s3://moonlibs/ ./ && luarocks-admin make_manifest . && aws s3 sync --acl public-read ./ s3://moonlibs/;
Expand All @@ -50,3 +54,6 @@ jobs:
${{env.ROCK_NAME}}-dev-1.rockspec
${{env.ROCK_NAME}}-${{env.TAG}}-1.rockspec
${{env.ROCK_NAME}}-${{env.TAG}}-1.src.rock
override-${{env.ROCK_NAME}}-dev-1.rockspec
override-${{env.ROCK_NAME}}-${{env.TAG}}-1.rockspec
override-${{env.ROCK_NAME}}-${{env.TAG}}-1.src.rock
21 changes: 21 additions & 0 deletions override-config-dev-1.rockspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package = "override-config"
version = "dev-1"
source = {
url = "git+https://github.com/moonlibs/config",
branch = "master"
}
description = {
summary = "Package for loading external lua config (override)",
homepage = "https://github.com/moonlibs/config.git",
license = "BSD"
}
dependencies = {
"lua >= 5.1"
}
build = {
type = "builtin",
modules = {
["override.config"] = "config.lua",
["override.config.etcd"] = "config/etcd.lua"
}
}

0 comments on commit cd0bf83

Please sign in to comment.