Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
Create zipfile after code-quality step
Browse files Browse the repository at this point in the history
  • Loading branch information
edenhaus committed Oct 23, 2023
1 parent 87bf66b commit a9c6978
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 47 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,47 @@ jobs:
run: mypy custom_components/
- name: Pylint review
run: pylint custom_components/

create_zip_file:
name: Create zip file for easy testing
permissions:
# Required to upload/save artifact, otherwise you'll get
# "Error: Resource not accessible by integration"
contents: write
# Required to post comment, otherwise you'll get
# "Error: Resource not accessible by integration"
pull-requests: write
needs:
- code-quality
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: 📥 Checkout the repository
uses: actions/checkout@v4

- name: 📦 Create zip file for the integration
run: |
cd "${{ github.workspace }}/custom_components/deebot"
zip deebot.zip -r ./
mv deebot.zip "${{ github.workspace }}/"
- name: 📤 Create comment with the artifiactory
uses: gavv/pull-request-artifacts@v2
with:
# Commit hash that triggered PR
commit: ${{ github.event.pull_request.head.sha }}

# Token for current repo (used to post PR comment)
repo-token: ${{ secrets.GITHUB_TOKEN }}

artifacts-branch: artifacts
inter-link: false

comment-title: |
🤖 Pull request artifactsy
For testing please download the zip file below and extract it in `[config folder]/custom_components/deebot`.
# Whitespace-separated list of files to upload
artifacts: |
deebot.zip
47 changes: 0 additions & 47 deletions .github/workflows/pr-artifacts.yml

This file was deleted.

0 comments on commit a9c6978

Please sign in to comment.