Skip to content

Commit

Permalink
ci(flux): [skip-ci] Update image from automation
Browse files Browse the repository at this point in the history
  • Loading branch information
ViBiOh committed Jan 6, 2021
1 parent a80159b commit 3722ff5
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 168 deletions.
18 changes: 8 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
---
version: 2

updates:
- package-ecosystem: gomod
directory: /
schedule:
interval: weekly
day: sunday
commit-message:
prefix: chore
include: scope
- package-ecosystem: gomod
directory: /
schedule:
interval: weekly
day: sunday
commit-message:
prefix: chore
include: scope
37 changes: 17 additions & 20 deletions .github/workflows/branch_clean.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
---
name: Git
on: [pull_request]
jobs:
build:
name: Branch is clean
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Fetch branches
run: |
git fetch --no-tags --prune origin "+refs/heads/${BASE}:refs/remotes/origin/${BASE}"
env:
BASE: ${{ github.base_ref }}

- name: Check commits description
env:
BASE: origin/${{ github.base_ref }}
HEAD: HEAD
run: |
curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/master/bootstrap" | bash -s "git_branch_clean"
scripts/git_branch_clean "${BASE}" "${HEAD}"
- name: Check out code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Fetch branches
run: |
git fetch --no-tags --prune origin "+refs/heads/${BASE}:refs/remotes/origin/${BASE}"
env:
BASE: ${{ github.base_ref }}
- name: Check commits description
env:
BASE: origin/${{ github.base_ref }}
HEAD: HEAD
run: |
curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/master/bootstrap" | bash -s "git_branch_clean"
scripts/git_branch_clean "${BASE}" "${HEAD}"
114 changes: 54 additions & 60 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,92 +1,86 @@
---
name: Build

on:
push:
branches:
- master
- master
pull_request:
branches:
- master

- master
env:
SCRIPTS_NO_INTERACTIVE: "true"

defaults:
run:
shell: bash

jobs:
build:
name: Golang
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "^1.15"
- run: |
make
git --no-pager diff -- ':(exclude)go.sum' && git diff --quiet -- ':(exclude)go.sum'
- uses: codecov/codecov-action@v1

- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "^1.15"
- run: |
make
git --no-pager diff -- ':(exclude)go.sum' && git diff --quiet -- ':(exclude)go.sum'
- uses: codecov/codecov-action@v1
package:
name: Docker
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "^1.15"
- name: Build
run: |
curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/master/bootstrap" | bash -s "release"
curl --disable --silent --show-error --location --max-time 30 -o mime.types "https://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types?view=co"
DOCKER_IMAGE="${{ secrets.DOCKER_USER }}/$(make name)" IMAGE_VERSION="$(make version)" ./scripts/release build docker
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "^1.15"
- name: Build
run: |
curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/master/bootstrap" | bash -s "release"
curl --disable --silent --show-error --location --max-time 30 -o mime.types "https://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types?view=co"
DOCKER_IMAGE="${{ secrets.DOCKER_USER }}/$(make name)" IMAGE_VERSION="$(make version)" ./scripts/release build docker
publish:
name: Publish
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && !contains(toJSON(github.event.commits.*.message), '[skip-ci]')
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && !contains(toJSON(github.event.commits.*.message),
'[skip-ci]')
runs-on: ubuntu-latest
needs: package
steps:
- uses: actions/checkout@v2
- name: Publish
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
run: |
curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/master/bootstrap" | bash -s "docker_promote"
scripts/docker_promote "${{ secrets.DOCKER_USER }}/$(make name)" "$(make version)"
- name: GoReport
run: |
curl --disable --silent --show-error --location --max-time 30 -X POST https://goreportcard.com/checks?repo=github.com/${GITHUB_REPOSITORY}
- uses: actions/checkout@v2
- name: Publish
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
run: |
curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/master/bootstrap" | bash -s "docker_promote"
scripts/docker_promote "${{ secrets.DOCKER_USER }}/$(make name)" "$(make version)"
- name: GoReport
run: |
curl --disable --silent --show-error --location --max-time 30 -X POST https://goreportcard.com/checks?repo=github.com/${GITHUB_REPOSITORY}
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: publish
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && !contains(toJSON(github.event.commits.*.message), '[skip-ci]')
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && !contains(toJSON(github.event.commits.*.message),
'[skip-ci]')
steps:
- uses: actions/checkout@v2
- name: Deploy
env:
BASIC_USERS: ${{ secrets.BASIC_USERS }}
DATA_DIR: ${{ secrets.DATA_DIR }}
DATA_USER_ID: ${{ secrets.DATA_USER_ID }}
DEPLOY_CREDENTIALS: ${{ secrets.DEPLOY_CREDENTIALS }}
DEPLOY_URL: ${{ secrets.DEPLOY_URL }}
DOCKER_USER: ${{ secrets.DOCKER_USER }}
run: |
curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/master/bootstrap" | bash -s "deploy" "env_replace"
VERSION="$(make version)" scripts/env_replace "docker-compose.yml" DOCKER_USER DATA_DIR DATA_USER_ID BASIC_USERS VERSION | sed "s|\\\$|\$\$|g" > "docker-compose-env.yml"
scripts/deploy "$(make name)" "@docker-compose-env.yml"
- uses: actions/checkout@v2
- name: Deploy
env:
BASIC_USERS: ${{ secrets.BASIC_USERS }}
DATA_DIR: ${{ secrets.DATA_DIR }}
DATA_USER_ID: ${{ secrets.DATA_USER_ID }}
DEPLOY_CREDENTIALS: ${{ secrets.DEPLOY_CREDENTIALS }}
DEPLOY_URL: ${{ secrets.DEPLOY_URL }}
DOCKER_USER: ${{ secrets.DOCKER_USER }}
run: |
curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/master/bootstrap" | bash -s "deploy" "env_replace"
VERSION="$(make version)" scripts/env_replace "docker-compose.yml" DOCKER_USER DATA_DIR DATA_USER_ID BASIC_USERS VERSION | sed "s|\\\$|\$\$|g" > "docker-compose-env.yml"
scripts/deploy "$(make name)" "@docker-compose-env.yml"
39 changes: 15 additions & 24 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,33 @@
---
name: 'CodeQL'

on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '0 0 * * 6'

- cron: '0 0 * * 6'
jobs:
analyze:
name: Analyze
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['go']

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 2

- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

- name: Autobuild
run: make build

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 2
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Autobuild
run: make build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
32 changes: 15 additions & 17 deletions .github/workflows/herodote.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
---
name: Herodote
on:
push:
branches:
- master
- master
jobs:
build:
name: Feed
runs-on: ubuntu-latest
steps:
- name: Fetch history
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Push history
run: |
curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/herodote/master/herodote.sh" | bash
env:
HERODOTE_API: https://herodote.vibioh.fr
HERODOTE_SECRET: ${{ secrets.HERODOTE_SECRET }}
GIT_HOST: github.com
GIT_REPOSITORY: ${{ github.repository }}
SCRIPTS_NO_INTERACTIVE: "1"
- name: Fetch history
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Push history
run: |
curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/herodote/master/herodote.sh" | bash
env:
HERODOTE_API: https://herodote.vibioh.fr
HERODOTE_SECRET: ${{ secrets.HERODOTE_SECRET }}
GIT_HOST: github.com
GIT_REPOSITORY: ${{ github.repository }}
SCRIPTS_NO_INTERACTIVE: "1"
7 changes: 2 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
version: '2.1'

services:
video:
image: vibioh/vith
Expand All @@ -20,8 +18,7 @@ services:
cpu_shares: 128
mem_limit: '1073741824'
security_opt:
- no-new-privileges

- no-new-privileges
image:
image: h2non/imaginary
labels:
Expand All @@ -39,4 +36,4 @@ services:
cpu_shares: 128
mem_limit: '1073741824'
security_opt:
- no-new-privileges
- no-new-privileges
Loading

0 comments on commit 3722ff5

Please sign in to comment.