-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8f4d438
Showing
18 changed files
with
1,583 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
exclude: | ||
- main | ||
- stable | ||
- develop | ||
delete_closed_pr: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: dependency-updates | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
schedule: | ||
- cron: "0 */6 * * *" | ||
workflow_dispatch: | ||
jobs: | ||
peertube-update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: update peertube version | ||
id: update | ||
run: | | ||
PT_VERSION="$( | ||
git ls-remote --tags https://github.com/Chocobozzz/PeerTube \ | ||
| cut -d/ -f3 \ | ||
| sort -V \ | ||
| tail -1 \ | ||
| sed "s|\^{}||g" | ||
)" | ||
sed -i "s|PT_VERSION=.*|PT_VERSION=$PT_VERSION \\\|" ./Dockerfile | ||
echo "version=$PT_VERSION" >> $GITHUB_OUTPUT | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
signoff: true | ||
delete-branch: true | ||
commit-message: update peertube version to ${{ steps.update.outputs.version }} | ||
branch: update-peertube-version | ||
title: update peertube version to ${{ steps.update.outputs.version }} | ||
body: update peertube version to ${{ steps.update.outputs.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Docker push develop to latest | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Login to DockerHub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Convert Username | ||
id: un | ||
run: echo "un=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ steps.un.outputs.un }} | ||
password: ${{ github.token }} | ||
- name: Push develop to latest | ||
run: | | ||
docker buildx imagetools create --tag ${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:latest ${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ github.ref_name }} | ||
docker buildx imagetools create --tag ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:latest ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ github.ref_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Build Docker Image | ||
on: | ||
# schedule: | ||
# - cron: "0 0 */6 * *" | ||
push: | ||
branches: | ||
- latest | ||
- develop | ||
paths: | ||
- Dockerfile | ||
- .github/workflows/docker.yml | ||
pull_request: | ||
paths: | ||
- Dockerfile | ||
- .github/workflows/docker.yml | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: arm64 #all | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=-1 | ||
- name: Login to DockerHub | ||
if: ${{ github.event_name != 'pull_request' }} | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Convert Username | ||
id: un | ||
run: echo "un=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ steps.un.outputs.un }} | ||
password: ${{ github.token }} | ||
- name: Build | ||
uses: docker/build-push-action@v6 | ||
if: ${{ github.event_name != 'pull_request' }} | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
platforms: linux/amd64,linux/arm64 #,linux/amd64/v2,linux/amd64/v3,linux/amd64/v4 #,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: | | ||
${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ github.ref_name }} | ||
${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ github.run_number }} | ||
ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ github.ref_name }} | ||
ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ github.run_number }} | ||
- name: Set PR-Number (PR) | ||
if: ${{ github.event_name == 'pull_request' }} | ||
id: pr | ||
run: echo "pr=$(echo pr-${{ github.ref_name }} | sed "s|refs/pull/:||g" | sed "s|/merge||g")" >> $GITHUB_OUTPUT | ||
- name: Build (PR) | ||
uses: docker/build-push-action@v6 | ||
if: ${{ github.event_name == 'pull_request' }} | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
platforms: linux/amd64,linux/arm64 #,linux/amd64/v2,linux/amd64/v3,linux/amd64/v4 #,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 | ||
push: ${{ github.event_name == 'pull_request' }} | ||
tags: ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }} | ||
- name: add comment (PR) | ||
uses: mshick/add-pr-comment@v2 | ||
if: ${{ github.event_name == 'pull_request' }} | ||
with: | ||
message: "The Docker Image can now be found here: `ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}`" | ||
repo-token: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Dockerlint | ||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
jobs: | ||
docker-lint: | ||
runs-on: ubuntu-latest | ||
name: docker-lint | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install hadolint | ||
run: | | ||
sudo wget https://github.com/hadolint/hadolint/releases/latest/download/hadolint-Linux-x86_64 -O /usr/bin/hadolint | ||
sudo chmod +x /usr/bin/hadolint | ||
- name: run lint | ||
run: | | ||
DOCKERFILES="$(find . -name "*Dockerfile*")" | ||
for file in $(echo "$DOCKERFILES" | tr " " "\n"); do | ||
# DL3003 warning: Use WORKDIR to switch to a directory | ||
# DL3018 warning: Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>` | ||
# DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>` | ||
hadolint "$file" --ignore DL3003 --ignore DL3013 --ignore DL3018 | tee -a hadolint.log | ||
done | ||
if grep -q "DL[0-9]\+\|SC[0-9]\+" hadolint.log; then | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: JSON check | ||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
jobs: | ||
test-json: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: json-syntax-check | ||
uses: limitusus/json-syntax-check@v2 | ||
with: | ||
pattern: "\\.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: spellcheck | ||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
jobs: | ||
spellcheck: | ||
name: spellcheck | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code. | ||
uses: actions/checkout@v4 | ||
- name: Check spelling | ||
uses: codespell-project/actions-codespell@v2 | ||
with: | ||
check_filenames: true | ||
check_hidden: true | ||
skip: .git,.gitignore |
Oops, something went wrong.