Merge pull request #2 from valet-customers/use-gh-valet
Use `gh-valet` CLI to run Valet commands
This commit is contained in:
@@ -28,18 +28,23 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
command: ${{ steps.prepare.outputs.command }}
|
command: ${{ steps.prepare.outputs.command }}
|
||||||
log-filename: ${{ steps.logs.outputs.filename }}
|
log-filename: ${{ steps.logs.outputs.filename }}
|
||||||
container:
|
|
||||||
image: ghcr.io/valet-customers/valet-cli:latest
|
|
||||||
credentials:
|
|
||||||
username: ${{ secrets.valet_ghcr_username }}
|
|
||||||
password: ${{ secrets.valet_ghcr_password }}
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install Valet CLI
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
gh extension install github/gh-valet
|
||||||
|
gh valet update --username ${{ secrets.valet_ghcr_username }} --password ${{ secrets.valet_ghcr_password }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.valet_ghcr_password }}
|
||||||
- uses: actions-ecosystem/action-add-labels@v1
|
- uses: actions-ecosystem/action-add-labels@v1
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
labels: valet-running
|
labels: valet-running
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: 2.7.1
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bundle install --without development
|
run: bundle install --without development
|
||||||
- name: Prepare arguments
|
- name: Prepare arguments
|
||||||
@@ -58,18 +63,18 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
- name: execute valet
|
- name: execute valet
|
||||||
run: |
|
run: |
|
||||||
valet ${{ steps.prepare.outputs.command }} ${{ steps.prepare.outputs.provider }} \
|
gh valet ${{ steps.prepare.outputs.command }} ${{ steps.prepare.outputs.provider }} \
|
||||||
${{ steps.prepare.outputs.args }} \
|
${{ steps.prepare.outputs.args }} \
|
||||||
--output-dir /data/output
|
--output-dir output
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
path: /data/output/
|
path: output/
|
||||||
name: output
|
name: output
|
||||||
- if: always()
|
- if: always()
|
||||||
id: logs
|
id: logs
|
||||||
run: |
|
run: |
|
||||||
path=$(ls /data/output/log/*.log | head -1)
|
path=$(ls output/log/*.log | head -1)
|
||||||
filename=$(basename "$path")
|
filename=$(basename "$path")
|
||||||
echo "LOG_FILE_PATH=$path" >> $GITHUB_ENV
|
echo "LOG_FILE_PATH=$path" >> $GITHUB_ENV
|
||||||
echo "::set-output name=filename::$filename"
|
echo "::set-output name=filename::$filename"
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ source "https://rubygems.org"
|
|||||||
|
|
||||||
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
||||||
|
|
||||||
|
gem "activesupport", "~> 7.0"
|
||||||
|
gem "json", "~> 2.6"
|
||||||
gem "require_all", "~> 3.0.0"
|
gem "require_all", "~> 3.0.0"
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
|
|||||||
+5
-4
@@ -1,12 +1,11 @@
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
activesupport (6.1.4.1)
|
activesupport (7.0.3)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
tzinfo (~> 2.0)
|
tzinfo (~> 2.0)
|
||||||
zeitwerk (~> 2.3)
|
|
||||||
ast (2.4.2)
|
ast (2.4.2)
|
||||||
byebug (11.1.3)
|
byebug (11.1.3)
|
||||||
coderay (1.1.3)
|
coderay (1.1.3)
|
||||||
@@ -20,8 +19,9 @@ GEM
|
|||||||
i18n (1.8.11)
|
i18n (1.8.11)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
jaro_winkler (1.5.4)
|
jaro_winkler (1.5.4)
|
||||||
|
json (2.6.2)
|
||||||
method_source (1.0.0)
|
method_source (1.0.0)
|
||||||
minitest (5.14.4)
|
minitest (5.15.0)
|
||||||
parallel (1.21.0)
|
parallel (1.21.0)
|
||||||
parser (3.0.3.1)
|
parser (3.0.3.1)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
@@ -70,16 +70,17 @@ GEM
|
|||||||
tzinfo (2.0.4)
|
tzinfo (2.0.4)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
unicode-display_width (1.6.1)
|
unicode-display_width (1.6.1)
|
||||||
zeitwerk (2.5.1)
|
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
x86_64-darwin-19
|
x86_64-darwin-19
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
|
activesupport (~> 7.0)
|
||||||
dotenv (~> 2.7.6)
|
dotenv (~> 2.7.6)
|
||||||
factory_bot (~> 6.1)
|
factory_bot (~> 6.1)
|
||||||
faker (~> 2.17)
|
faker (~> 2.17)
|
||||||
|
json (~> 2.6)
|
||||||
pry-byebug (~> 3.9)
|
pry-byebug (~> 3.9)
|
||||||
require_all (~> 3.0.0)
|
require_all (~> 3.0.0)
|
||||||
rspec (~> 3.10)
|
rspec (~> 3.10)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "require_all"
|
require "require_all"
|
||||||
require "pry" if ENV["VALET_CONTAINER"].nil?
|
require "pry" if ENV["CI"].nil?
|
||||||
require "json"
|
require "json"
|
||||||
|
|
||||||
require_all "lib"
|
require_all "lib"
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ module CircleCI
|
|||||||
include IssueParser
|
include IssueParser
|
||||||
|
|
||||||
def initialize(issue_content, command)
|
def initialize(issue_content, command)
|
||||||
# TODO: manually test this
|
|
||||||
@organization = parameter_from_issue("Organization", issue_content)
|
@organization = parameter_from_issue("Organization", issue_content)
|
||||||
@project = command.options["project"]
|
@project = command.options["project"]
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user