mirror of
https://github.com/hassio-addons/addon-ubuntu-base.git
synced 2025-05-07 12:21:24 +00:00
Apply updated repository structure & CI workflow (#53)
This commit is contained in:
parent
b0d34ac2db
commit
7e1fd2a038
9 changed files with 1914 additions and 37 deletions
133
.github/CODE_OF_CONDUCT.md
vendored
Normal file
133
.github/CODE_OF_CONDUCT.md
vendored
Normal file
|
@ -0,0 +1,133 @@
|
|||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
- Demonstrating empathy and kindness toward other people
|
||||
- Being respectful of differing opinions, viewpoints, and experiences
|
||||
- Giving and gracefully accepting constructive feedback
|
||||
- Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
- Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
- The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
- Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
frenck@frenck.dev.
|
||||
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.0, available at
|
||||
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
|
||||
|
||||
Community Impact Guidelines were inspired by
|
||||
[Mozilla's code of conduct enforcement ladder][mozilla coc].
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
[https://www.contributor-covenant.org/faq][faq]. Translations are available
|
||||
at [https://www.contributor-covenant.org/translations][translations].
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
|
||||
[mozilla coc]: https://github.com/mozilla/diversity
|
||||
[faq]: https://www.contributor-covenant.org/faq
|
||||
[translations]: https://www.contributor-covenant.org/translations
|
29
.github/CONTRIBUTING.md
vendored
Normal file
29
.github/CONTRIBUTING.md
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Contributing
|
||||
|
||||
When contributing to this repository, please first discuss the change you wish
|
||||
to make via issue, email, or any other method with the owners of this repository
|
||||
before making a change.
|
||||
|
||||
Please note we have a code of conduct, please follow it in all your interactions
|
||||
with the project.
|
||||
|
||||
## Issues and feature requests
|
||||
|
||||
You've found a bug in the source code, a mistake in the documentation or maybe
|
||||
you'd like a new feature? You can help us by submitting an issue to our
|
||||
[GitHub Repository][github]. Before you create an issue, make sure you search
|
||||
the archive, maybe your question was already answered.
|
||||
|
||||
Even better: You could submit a pull request with a fix / new feature!
|
||||
|
||||
## Pull request process
|
||||
|
||||
1. Search our repository for open or closed [pull requests][prs] that relates
|
||||
to your submission. You don't want to duplicate effort.
|
||||
|
||||
1. You may merge the pull request in once you have the sign-off of two other
|
||||
developers, or if you do not have permission to do that, you may request
|
||||
the second reviewer to merge it for you.
|
||||
|
||||
[github]: https://github.com/hassio-addons/addon-ubuntu-base/issues
|
||||
[prs]: https://github.com/hassio-addons/addon-ubuntu-base/pulls
|
1839
.github/SECURITY.md
vendored
Normal file
1839
.github/SECURITY.md
vendored
Normal file
File diff suppressed because it is too large
Load diff
21
.github/pr-labels.yaml
vendored
Normal file
21
.github/pr-labels.yaml
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
name: PR Labels
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, labeled, unlabeled, synchronize]
|
||||
|
||||
jobs:
|
||||
pr_labels:
|
||||
name: Verify
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🏷 Verify PR has a valid label
|
||||
uses: jesusvasquez333/verify-pr-label-action@v1.4.0
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
valid-labels: >-
|
||||
breaking-change, bugfix, documentation, enhancement, refactor,
|
||||
performance, new-feature, maintenance, ci, dependencies
|
||||
disable-reviews: true
|
12
.github/workflows/ci.yaml
vendored
12
.github/workflows/ci.yaml
vendored
|
@ -50,7 +50,7 @@ jobs:
|
|||
- name: ⤵️ Check out code from GitHub
|
||||
uses: actions/checkout@v2.3.4
|
||||
- name: 🚀 Run Hadolint
|
||||
uses: brpaz/hadolint-action@v1.3.1
|
||||
uses: brpaz/hadolint-action@v1.4.0
|
||||
with:
|
||||
dockerfile: "./${{ needs.information.outputs.target }}/Dockerfile"
|
||||
|
||||
|
@ -81,7 +81,7 @@ jobs:
|
|||
- name: ⤵️ Check out code from GitHub
|
||||
uses: actions/checkout@v2.3.4
|
||||
- name: 🚀 Run Shellcheck
|
||||
uses: ludeeus/action-shellcheck@1.0.0
|
||||
uses: ludeeus/action-shellcheck@1.1.0
|
||||
env:
|
||||
SHELLCHECK_OPTS: -s bash
|
||||
|
||||
|
@ -127,14 +127,14 @@ jobs:
|
|||
uses: actions/checkout@v2.3.4
|
||||
- name: 🏗 Set up build cache
|
||||
id: cache
|
||||
uses: actions/cache@v2.1.4
|
||||
uses: actions/cache@v2.1.5
|
||||
with:
|
||||
path: /tmp/.docker-cache
|
||||
key: docker-${{ github.ref }}-${{ matrix.architecture }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
docker-${{ github.ref }}-${{ matrix.architecture }}
|
||||
- name: 🏗 Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1.0.1
|
||||
uses: docker/setup-qemu-action@v1.0.2
|
||||
- name: 🏗 Set up QEMU User Static for aarch64
|
||||
if: ${{ matrix.architecture == 'aarch64' }}
|
||||
run: |
|
||||
|
@ -148,7 +148,7 @@ jobs:
|
|||
"https://github.com/hassio-addons/qemu-user-static/releases/download/v5.0.0/qemu-arm-static.tar.gz" | \
|
||||
tar zxvf - -C "${{ needs.information.outputs.target }}/rootfs/usr/bin/"
|
||||
- name: 🏗 Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1.1.1
|
||||
uses: docker/setup-buildx-action@v1.1.2
|
||||
- name: ℹ️ Compose build flags
|
||||
id: flags
|
||||
run: |
|
||||
|
@ -171,7 +171,7 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
- name: 🚀 Build
|
||||
uses: docker/build-push-action@v2.3.0
|
||||
uses: docker/build-push-action@v2.4.0
|
||||
with:
|
||||
push: false
|
||||
context: ${{ needs.information.outputs.target }}
|
||||
|
|
56
.github/workflows/deploy.yaml
vendored
56
.github/workflows/deploy.yaml
vendored
|
@ -62,18 +62,24 @@ jobs:
|
|||
matrix:
|
||||
architecture: ${{ fromJson(needs.information.outputs.architectures) }}
|
||||
steps:
|
||||
- name: 🔂 Wait for other runs to complete
|
||||
uses: softprops/turnstyle@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: ⤵️ Check out code from GitHub
|
||||
uses: actions/checkout@v2.3.4
|
||||
- name: 🏗 Set up build cache
|
||||
id: cache
|
||||
uses: actions/cache@v2.1.4
|
||||
uses: actions/cache@v2.1.5
|
||||
with:
|
||||
path: /tmp/.docker-cache
|
||||
key: docker-${{ github.ref }}-${{ matrix.architecture }}-${{ github.sha }}
|
||||
key:
|
||||
docker-${{ github.ref }}-${{ matrix.architecture }}-${{ github.sha
|
||||
}}
|
||||
restore-keys: |
|
||||
docker-${{ github.ref }}-${{ matrix.architecture }}
|
||||
- name: 🏗 Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1.0.1
|
||||
uses: docker/setup-qemu-action@v1.0.2
|
||||
- name: 🏗 Set up QEMU User Static for aarch64
|
||||
if: ${{ matrix.architecture == 'aarch64' }}
|
||||
run: |
|
||||
|
@ -81,13 +87,16 @@ jobs:
|
|||
"https://github.com/hassio-addons/qemu-user-static/releases/download/v5.0.0/qemu-aarch64-static.tar.gz" | \
|
||||
tar zxvf - -C "${{ needs.information.outputs.target }}/rootfs/usr/bin/"
|
||||
- name: 🏗 Set up QEMU User Static for armhf/armv7
|
||||
if: ${{ matrix.architecture == 'armhf' || matrix.architecture == 'armv7' }}
|
||||
if: ${{ matrix.architecture == 'armhf' || matrix.architecture == 'armv7'
|
||||
}}
|
||||
run: |
|
||||
curl -L -s \
|
||||
"https://github.com/hassio-addons/qemu-user-static/releases/download/v5.0.0/qemu-arm-static.tar.gz" | \
|
||||
tar zxvf - -C "${{ needs.information.outputs.target }}/rootfs/usr/bin/"
|
||||
- name: 🏗 Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1.1.1
|
||||
uses: docker/setup-buildx-action@v1.1.2
|
||||
- name: 🏗 Set up CodeNotary
|
||||
run: bash <(curl https://getvcn.codenotary.com -L)
|
||||
- name: ℹ️ Compose build flags
|
||||
id: flags
|
||||
run: |
|
||||
|
@ -113,12 +122,12 @@ jobs:
|
|||
uses: docker/login-action@v1.8.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ secrets.GHCR_USERNAME }}
|
||||
password: ${{ secrets.GHCR_PASSWORD }}
|
||||
- name: 🚀 Build and push
|
||||
uses: docker/build-push-action@v2.3.0
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: 🚀 Build
|
||||
uses: docker/build-push-action@v2.4.0
|
||||
with:
|
||||
push: true
|
||||
load: true
|
||||
# yamllint disable rule:line-length
|
||||
tags: |
|
||||
ghcr.io/hassio-addons/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.environment }}
|
||||
|
@ -138,3 +147,30 @@ jobs:
|
|||
BUILD_REF=${{ github.sha }}
|
||||
BUILD_REPOSITORY=${{ github.repository }}
|
||||
BUILD_VERSION=${{ needs.information.outputs.version }}
|
||||
- name: 🔏 Notarize
|
||||
# yamllint disable rule:line-length
|
||||
run: |
|
||||
if vcn authenticate \
|
||||
--output json \
|
||||
"docker://ghcr.io/hassio-addons/${{ 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/hassio-addons/${{ 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: |
|
||||
docker push \
|
||||
"ghcr.io/hassio-addons/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.environment }}"
|
||||
docker push \
|
||||
"ghcr.io/hassio-addons/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.version }}"
|
||||
|
|
2
.github/workflows/release-drafter.yaml
vendored
2
.github/workflows/release-drafter.yaml
vendored
|
@ -13,6 +13,6 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🚀 Run Release Drafter
|
||||
uses: release-drafter/release-drafter@v5.14.0
|
||||
uses: release-drafter/release-drafter@v5.15.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
2
.github/workflows/stale.yaml
vendored
2
.github/workflows/stale.yaml
vendored
|
@ -13,7 +13,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🚀 Run stale
|
||||
uses: actions/stale@v3.0.16
|
||||
uses: actions/stale@v3.0.18
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-stale: 30
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue