Skip to content

Commit

Permalink
👷 Update CI
Browse files Browse the repository at this point in the history
- Switch to centralized GitHub Action Workflows provided by Hassio Community Addons, while utilizing customized ones where needed.
- Clean Up of Unused workflow files.
  • Loading branch information
GauthamVarmaK committed Nov 2, 2021
1 parent 726660d commit 855210c
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 262 deletions.
85 changes: 0 additions & 85 deletions .github/labels.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .github/release-drafter.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,6 @@ jobs:
fi
- name: ⤵️ Download base image
run: docker pull "${{ steps.flags.outputs.from }}"
- name: ✅ Verify authenticity of base image
run: |
vcn authenticate \
"docker://${{ steps.flags.outputs.from }}"
vcn authenticate \
--output json \
--signerID 0x03e406879fd89e52f38f4aab0061266d1183980a \
"docker://${{ steps.flags.outputs.from }}" \
| jq \
--exit-status \
'.verification.status == 0'
- name: 🚀 Build
uses: docker/[email protected]
with:
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,6 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: ⤵️ Download base image
run: docker pull "${{ steps.flags.outputs.from }}"
- name: ✅ Verify authenticity of base image
run: |
vcn authenticate \
"docker://${{ steps.flags.outputs.from }}"
vcn authenticate \
--output json \
--signerID 0x03e406879fd89e52f38f4aab0061266d1183980a \
"docker://${{ steps.flags.outputs.from }}" \
| jq \
--exit-status \
'.verification.status == 0'
- name: 🚀 Build
uses: docker/[email protected]
with:
Expand Down Expand Up @@ -157,26 +146,6 @@ jobs:
run: |
rm -rf /tmp/.docker-cache
mv /tmp/.docker-cache-new /tmp/.docker-cache
- name: 🔏 Notarize
# yamllint disable rule:line-length
run: |
if vcn authenticate \
--output json \
"docker://ghcr.io/gauthamvarmak/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.version }}" \
| jq \
--exit-status \
'.verification.status != 0';
then
vcn login
vcn notarize \
--public \
"docker://ghcr.io/gauthamvarmak/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.version }}"
fi
env:
VCN_USER: ${{ secrets.VCN_USER }}
VCN_PASSWORD: ${{ secrets.VCN_PASSWORD }}
VCN_NOTARIZATION_PASSWORD: ${{ secrets.VCN_NOTARIZATION_PASSWORD }}
VCN_OTP_EMPTY: true
- name: 🚀 Push
# yamllint disable rule:line-length
run: |
Expand Down
22 changes: 7 additions & 15 deletions .github/workflows/labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,12 @@ name: Sync labels

# yamllint disable-line rule:truthy
on:
push:
branches:
- main
paths:
- .github/labels.yml
schedule:
- cron: "34 5 * * *"
workflow_dispatch:

jobs:
labels:
name: ♻️ Sync labels
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/[email protected]
- name: 🚀 Run Label Syncer
uses: micnncim/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
workflows:
uses: hassio-addons/workflows/.github/workflows/labels.yaml@main
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 4 additions & 11 deletions .github/workflows/lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,7 @@ on:
workflow_dispatch:

jobs:
lock:
name: 🔒 Lock closed issues and PRs
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v3
with:
github-token: ${{ github.token }}
issue-lock-inactive-days: "30"
issue-lock-reason: ""
pr-lock-inactive-days: "1"
pr-lock-reason: ""
workflows:
uses: hassio-addons/workflows/.github/workflows/lock.yaml@main
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 9 additions & 14 deletions .github/workflows/pr-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,14 @@ name: PR Labels
# yamllint disable-line rule:truthy
on:
pull_request_target:
types: [opened, labeled, unlabeled, synchronize]
types:
- opened
- labeled
- unlabeled
- synchronize

jobs:
pr_labels:
name: Verify
runs-on: ubuntu-latest
steps:
- name: 🏷 Verify PR has a valid label
uses: jesusvasquez333/[email protected]
with:
pull-request-number: "${{ github.event.pull_request.number }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
valid-labels: >-
breaking-change, bugfix, documentation, enhancement, refactor,
performance, new-feature, maintenance, ci, dependencies
disable-reviews: true
workflows:
uses: hassio-addons/workflows/.github/workflows/pr-labels.yaml@main
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 4 additions & 8 deletions .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ on:
- main

jobs:
update_release_draft:
name: ✏️ Draft release
runs-on: ubuntu-latest
steps:
- name: 🚀 Run Release Drafter
uses: release-drafter/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
workflows:
uses: hassio-addons/workflows/.github/workflows/release-drafter.yaml@main
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 4 additions & 30 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,7 @@ on:
workflow_dispatch:

jobs:
stale:
name: 🧹 Clean up stale issues and PRs
runs-on: ubuntu-latest
steps:
- name: 🚀 Run stale
uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 30
days-before-close: 7
remove-stale-when-updated: true
stale-issue-label: "stale"
exempt-issue-labels: "no-stale,help-wanted"
stale-issue-message: >
There hasn't been any activity on this issue recently, so we
clean up some of the older and inactive issues.
Please make sure to update to the latest version and
check if that solves the issue. Let us know if that works for you
by leaving a comment 👍
This issue has now been marked as stale and will be closed if no
further activity occurs. Thanks!
stale-pr-label: "stale"
exempt-pr-labels: "no-stale"
stale-pr-message: >
There hasn't been any activity on this pull request recently. This
pull request has been automatically marked as stale because of that
and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.
workflows:
uses: hassio-addons/workflows/.github/workflows/stale.yaml@main
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 855210c

Please sign in to comment.