Use gh-valet cli in issue_ops.yml

This commit is contained in:
Ethan Dennis
2022-05-31 11:14:35 -07:00
parent ab3d123c06
commit f4fe9069ef
2 changed files with 13 additions and 10 deletions
+13 -9
View File
@@ -28,18 +28,22 @@ 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: |
echo ${{ secrets.valet_ghcr_password }} | gh auth login --with-token
gh extension install github/gh-valet
gh valet update --username ${{ secrets.valet_ghcr_username }} --password ${{ 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 +62,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"
-1
View File
@@ -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