diff options
author | nicolargo <nicolas@nicolargo.com> | 2021-01-23 11:10:27 +0100 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2021-01-23 11:10:27 +0100 |
commit | 0d35d5477bd1afbbb0bd990592fb69e7bae3743b (patch) | |
tree | 6f84805151a45589ae2c9333c9b90677a81c9b5c /.github | |
parent | cdb6bfbb70cd5efb9f5e040e4247111e106367d4 (diff) | |
parent | 1b36ed92a213e56a5801a4d962de7e9164def927 (diff) |
version 3.1.6v3.1.6
Diffstat (limited to '.github')
-rw-r--r-- | .github/ISSUE_TEMPLATE/bug_report.md | 31 | ||||
-rw-r--r-- | .github/ISSUE_TEMPLATE/feature_request.md | 20 | ||||
-rw-r--r-- | .github/workflows/main.yml | 85 |
3 files changed, 136 insertions, 0 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..8130bd8d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Start Glances with the followings options '...' +2. Press the key '....' +3. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. GNU/Linux Ubuntu 20.04] + - Glances Version [output of glances -V] + - Glances logs file [output of tail -10 <glances logs file>] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..bbcbbe7d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..d58e3e41 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,85 @@ +name: CI + +env: + DEFAULT_DOCKER_IMAGE: nicolargo/glances + NODE_ENV: ${{ (contains('refs/heads/master', github.ref) || startsWith(github.ref, 'refs/tags/v')) && 'prod' || 'dev' }} + PUSH_BRANCH: ${{ 'refs/heads/develop' == github.ref || 'refs/heads/master' == github.ref || startsWith(github.ref, 'refs/tags/v') }} + DOCKER_PLATFORMS: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386 + +on: + pull_request: + branches: [ develop ] + push: + branches: [ master, develop ] + tags: + - v* + +jobs: + buildx: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ env.NODE_ENV }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-${{ env.NODE_ENV }} + + - name: Configure ENVs + env: + DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE || env.DEFAULT_DOCKER_IMAGE }} + DOCKERFILE: ${{ env.NODE_ENV == 'prod' && './docker-files/Dockerfile' || './docker-files/dev.Dockerfile' }} + run: | + ls -la /tmp/.buildx-cache || true + VERSION=latest + + if [[ $GITHUB_REF == refs/tags/* ]]; then + VERSION=${GITHUB_REF#refs/tags/v} + fi + + if [[ $GITHUB_REF == refs/heads/develop ]]; then + VERSION=dev + fi + + echo "DOCKERFILE=${DOCKERFILE}" >> $GITHUB_ENV + echo "VERSION=${VERSION}" >> $GITHUB_ENV + echo "TAGS=${DOCKER_IMAGE}:${VERSION}" >> $GITHUB_ENV + echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV + echo "VCS_REF=${GITHUB_SHA::8}" >> $GITHUB_ENV + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + with: + platforms: all + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + with: + version: latest + + - name: Login to DockerHub + uses: docker/login-action@v1 + if: ${{ env.PUSH_BRANCH == 'true' }} + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push + uses: docker/build-push-action@v2 + with: + push: ${{ env.PUSH_BRANCH == 'true' }} + tags: ${{env.TAGS}} + build-args: | + VERSION=${{env.VERSION}} + BUILD_DATE=${{env.BUILD_DATE}} + VCS_REF=${{env.VCS_REF}} + context: . + file: ${{env.DOCKERFILE}} + platforms: ${{env.DOCKER_PLATFORMS}} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache,mode=max |