diff --git a/.github/workflows/conventional-commits.yml b/.github/workflows/conventional-commits.yml new file mode 100644 index 0000000..524876f --- /dev/null +++ b/.github/workflows/conventional-commits.yml @@ -0,0 +1,14 @@ +--- +name: conventional-commits + +"on": + pull_request: + types: + - opened + - reopened + - edited + - synchronize + +jobs: + conventional-commits: + uses: sous-chefs/.github/.github/workflows/conventional-commits.yml@5.0.3 diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml new file mode 100644 index 0000000..3fa3ae3 --- /dev/null +++ b/.github/workflows/copilot-setup-steps.yml @@ -0,0 +1,24 @@ +--- +name: 'Copilot Setup Steps' + +"on": + workflow_dispatch: + push: + paths: + - .github/workflows/copilot-setup-steps.yml + pull_request: + paths: + - .github/workflows/copilot-setup-steps.yml + +jobs: + copilot-setup-steps: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Check out code + uses: actions/checkout@v5 + - name: Install Chef + uses: actionshub/chef-install@main + - name: Install cookbooks + run: berks install diff --git a/.github/workflows/prevent-file-change.yml b/.github/workflows/prevent-file-change.yml new file mode 100644 index 0000000..0cfd639 --- /dev/null +++ b/.github/workflows/prevent-file-change.yml @@ -0,0 +1,16 @@ +--- +name: prevent-file-change + +"on": + pull_request: + types: + - opened + - reopened + - edited + - synchronize + +jobs: + prevent-file-change: + uses: sous-chefs/.github/.github/workflows/prevent-file-change.yml@5.0.3 + secrets: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f76a36a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +--- +name: release + +"on": + push: + branches: + - main + +permissions: + contents: write + issues: write + pull-requests: write + packages: write + attestations: write + id-token: write + +jobs: + release: + uses: sous-chefs/.github/.github/workflows/release-cookbook.yml@5.0.3 + secrets: + token: ${{ secrets.PORTER_GITHUB_TOKEN }} + supermarket_user: ${{ secrets.CHEF_SUPERMARKET_USER }} + supermarket_key: ${{ secrets.CHEF_SUPERMARKET_KEY }} diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml index 6fa8e77..ac5076b 100644 --- a/.markdownlint-cli2.yaml +++ b/.markdownlint-cli2.yaml @@ -3,3 +3,7 @@ config: line-length: false # MD013 no-duplicate-heading: false # MD024 reference-links-images: false # MD052 + no-multiple-blanks: + maximum: 2 +ignores: + - .github/copilot-instructions.md diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..79237d5 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.1.16" +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c9511f..27f224b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,55 +2,23 @@ This file is used to list changes made in each version of the GitHub cookbook. -## Unreleased - -## 1.1.16 - *2025-09-04* - -## 1.1.15 - *2024-05-02* - -## 1.1.14 - *2024-05-02* - -## 1.1.13 - *2024-05-01* - -## 1.1.12 - *2024-05-01* - -## 1.1.11 - *2024-05-01* - -## 1.1.10 - *2023-10-30* - -## 1.1.9 - *2023-10-30* - -## 1.1.8 - *2023-10-26* - -## 1.1.7 - *2023-09-28* - -## 1.1.6 - *2023-09-04* - ## 1.1.5 - *2023-06-08* Standardise files with files in sous-chefs/repo-management -## 1.1.4 - *2023-05-17* - -## 1.1.3 - *2023-05-03* - -## 1.1.2 - *2023-04-01* - -## 1.1.1 - *2023-03-02* - ## 1.1.0 - *2022-01-24* -- Add :extract action to github_asset resource +* Add :extract action to github_asset resource ## 1.0.1 - *2021-11-02* -- Fix typo +* Fix typo ## 1.0.0 - *2021-09-08* -- Sous-Chefs adoption -- Migrate to modern custom resources and enable `unified_mode` -- Remove dependency on libarchive -- Cookstyle fixes -- Fix URI deprecation issues -- Replace `extract` method with using the `archive_file` native resource +* Sous-Chefs adoption +* Migrate to modern custom resources and enable `unified_mode` +* Remove dependency on libarchive +* Cookstyle fixes +* Fix URI deprecation issues +* Replace `extract` method with using the `archive_file` native resource diff --git a/libraries/github_asset.rb b/libraries/github_asset.rb index 0dd2fee..43c8673 100644 --- a/libraries/github_asset.rb +++ b/libraries/github_asset.rb @@ -71,7 +71,7 @@ def download(options = {}) proxy_uri = ENV['https_proxy'] ? URI.parse(ENV['https_proxy']) : URI('') proxy_uri = URI.parse(ENV['HTTPS_PROXY']) if ENV['HTTPS_PROXY'] - p_user, p_pass = proxy_uri.userinfo.split(/:/) if proxy_uri.userinfo + p_user, p_pass = proxy_uri.userinfo.split(':') if proxy_uri.userinfo uri = URI(asset_url(options)) res = Net::HTTP::Proxy(proxy_uri.host, proxy_uri.port, p_user, p_pass).start(uri.hostname, uri.port, use_ssl: true) do |http| req = Net::HTTP::Get.new(uri.to_s) diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..79bf02b --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,12 @@ +{ + "packages": { + ".": { + "package-name": "github", + "changelog-path": "CHANGELOG.md", + "release-type": "ruby", + "include-component-in-tag": false, + "version-file": "metadata.rb" + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" +}