From 611251dd9a9dc4a14ab9e1ac311355ac5bade6e4 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Tue, 14 Jan 2025 08:09:28 +0100 Subject: [PATCH 1/4] 3572: Add License file --- LICENSE.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..9d9f703 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 ITK Development + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 7a80bf73edcf9d81332fe213de8e4a931b9b6d25 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Tue, 14 Jan 2025 08:09:51 +0100 Subject: [PATCH 2/4] 3572: Bumped itk-dev/vault required version. --- composer.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 813b63f..d94443c 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "itk-dev/vault-bundle", - "description": "Symfony bundle for vault", + "description": "Symfony bundle for HashiCorp Vault", "license": "MIT", "type": "symfony-bundle", "authors": [ @@ -13,12 +13,12 @@ ], "require": { "php": "^8.0", - "symfony/http-client": "^6.4|^7.0|^7.1|^7.2", + "symfony/http-client": "^6.4|^7.0", "nyholm/psr7": "^1.8", - "itk-dev/vault": "^0.0.5", - "symfony/dependency-injection": "^6.4|^7.0|^7.1|^7.2", - "symfony/config": "^6.4|^7.0|^7.1|^7.2", - "symfony/http-kernel": "^6.4|^7.0|^7.1|^7.2" + "itk-dev/vault": "^0.1.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.64" From 76218080f8e41bfa4ffb1da9ac41dc630ebdffd8 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Tue, 14 Jan 2025 08:10:07 +0100 Subject: [PATCH 3/4] 3572: Added action to auto create github release --- .github/workflows/github_build_release.yml | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/github_build_release.yml diff --git a/.github/workflows/github_build_release.yml b/.github/workflows/github_build_release.yml new file mode 100644 index 0000000..138aca6 --- /dev/null +++ b/.github/workflows/github_build_release.yml @@ -0,0 +1,43 @@ +on: + push: + tags: + - '*.*.*' + +name: Create Github Release + +permissions: + contents: write + +jobs: + create-release: + runs-on: ubuntu-latest + env: + COMPOSER_ALLOW_SUPERUSER: 1 + APP_ENV: prod + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Composer install + run: | + docker network create frontend + docker compose run --rm --user=root --env APP_ENV=prod phpfpm composer install --no-dev -o --classmap-authoritative + docker compose run --rm --user=root --env APP_ENV=prod phpfpm composer clear-cache + + - name: Make assets dir + run: | + mkdir -p ../assets + + - name: Create archive + run: tar -zcf --exclude='.git' ../assets/${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz ./ + + - name: Create checksum + run: | + cd ../assets + sha256sum ${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz > ../assets/checksum.txt + + - name: Create a release in GitHub and uploads assets + run: gh release create ${{ github.ref_name }} --verify-tag --generate-notes ../assets/*.* + env: + GITHUB_TOKEN: ${{ github.TOKEN }} + shell: bash From b469a914fa31c2a394b899f58d7eb8c3473b86e9 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Tue, 14 Jan 2025 08:15:04 +0100 Subject: [PATCH 4/4] 3572: Update Readme and Changelog --- CHANGELOG.md | 9 ++++++++- README.md | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9915032..cca47ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ See [keep a changelog] for information about writing changes to this log. ## [Unreleased] +## [0.1.1] + +* Bumped `itk-dev/vault` required version. +* Added action to auto create github release +* Added Licence + ## [0.1.0] * Bumped library version for better usage for composer constraints. @@ -35,7 +41,8 @@ See [keep a changelog] for information about writing changes to this log. [keep a changelog]: https://keepachangelog.com/en/1.1.0/ [Unreleased]: https://github.com/itk-dev/vault-bundle/compare/0.1.0...head -[0.0.4]: https://github.com/itk-dev/vault-library/compare/0.0.4...0.1.0 +[0.1.1]: https://github.com/itk-dev/vault-library/compare/0.1.0...0.1.1 +[0.1.0]: https://github.com/itk-dev/vault-library/compare/0.0.4...0.1.0 [0.0.4]: https://github.com/itk-dev/vault-library/compare/0.0.3...0.0.4 [0.0.3]: https://github.com/itk-dev/vault-library/compare/0.0.2...0.0.3 [0.0.2]: https://github.com/itk-dev/vault-library/compare/0.0.1...0.0.2 diff --git a/README.md b/README.md index 88aab21..53a7de8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,11 @@ -# Vault bundle +# Vault Bundle + +[![Github](https://img.shields.io/badge/source-itk--dev/vault--bundle-blue?style=flat-square)](https://github.com/itk-dev/vault-bundle) +[![Release](https://img.shields.io/packagist/v/itk-dev/vault-bundle.svg?style=flat-square&label=release)](https://packagist.org/packages/itk-dev/vault-bundle) +[![PHP Version](https://img.shields.io/packagist/php-v/itk-dev/vault-bundle.svg?style=flat-square&colorB=%238892BF)](https://www.php.net/downloads) +[![Build Status](https://img.shields.io/github/actions/workflow/status/itk-dev/vault-bundle/pr.yaml?label=CI&logo=github&style=flat-square)](https://github.com/itk-dev/vault-bundle/actions?query=workflow%3A%22Test+%26+Code+Style+Review%22) +[![Read License](https://img.shields.io/packagist/l/itk-dev/vault-bundle.svg?style=flat-square&colorB=darkcyan)](https://github.com/itk-dev/vault-bundle/blob/master/LICENSE.md) +[![Package downloads on Packagist](https://img.shields.io/packagist/dt/itk-dev/vault-bundle.svg?style=flat-square&colorB=darkmagenta)](https://packagist.org/packages/itk-dev/vault-bundle/stats) This bundle enables Symfony sites to interact with HashiCorp Vault using the "approle" authentication method. It allows fetching secrets and provides the