diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..132a966 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: [FuturePortal, rick-nu] diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 0000000..64e534c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,15 @@ +--- +name: Bug report +about: Submit a bug report. +title: '' +labels: 'bug' +assignees: '' +--- + +# What + +Please explain the bug here. + +## Reproduction scenario + +If applicable, please describe how to reproduce the situation. diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 0000000..7860332 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,15 @@ +--- +name: Feature request +about: Request a feature. +title: '' +labels: 'feature' +assignees: '' +--- + +# What + +Please explain what you would like. + +## Why + +Please explain why you would want this feature. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..4e23d6b --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +# What + +Please explain here what this PR contains. + +## Why + +Please explain why you want this change in the project. diff --git a/.github/workflows/flow--merge-request.yml b/.github/workflows/flow--merge-request.yml new file mode 100644 index 0000000..fec210b --- /dev/null +++ b/.github/workflows/flow--merge-request.yml @@ -0,0 +1,9 @@ +name: PR codestyle tests +on: + pull_request: + branches: + - production +jobs: + test: + name: Test + uses: ./.github/workflows/job--test-and-lint.yml diff --git a/.github/workflows/flow--new-master.yml b/.github/workflows/flow--new-master.yml new file mode 100644 index 0000000..1625e24 --- /dev/null +++ b/.github/workflows/flow--new-master.yml @@ -0,0 +1,19 @@ +name: Build the CIMonitor latest container +on: + push: + branches: + - production +jobs: + test: + name: Test + uses: ./.github/workflows/job--test-and-lint.yml + + build: + name: Build + uses: ./.github/workflows/job--build-containers.yml + needs: test + with: + BASE_TAG: latest + secrets: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} diff --git a/.github/workflows/flow--new-version.yml b/.github/workflows/flow--new-version.yml new file mode 100644 index 0000000..56475e6 --- /dev/null +++ b/.github/workflows/flow--new-version.yml @@ -0,0 +1,19 @@ +name: Tag new CIMonitor release +on: + push: + tags: + - '*' +jobs: + test: + name: Test + uses: ./.github/workflows/job--test-and-lint.yml + + build: + name: Build + uses: ./.github/workflows/job--build-containers.yml + needs: test + with: + BASE_TAG: ${GITHUB_REF/refs\/tags\//} + secrets: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} diff --git a/.github/workflows/job--build-containers.yml b/.github/workflows/job--build-containers.yml new file mode 100644 index 0000000..a2d7dc7 --- /dev/null +++ b/.github/workflows/job--build-containers.yml @@ -0,0 +1,31 @@ +name: Build and tag container +on: + workflow_call: + inputs: + BASE_TAG: + description: The base of the tag to build + required: true + type: string + secrets: + DOCKER_USERNAME: + required: true + DOCKER_TOKEN: + required: true +jobs: + build-and-tag-container: + name: Build & Tag + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + + - name: Build CIMonitor image + run: docker build --target production --tag rickvdstaaij/move-to-dropbox:latest . + + - name: Log in to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + + - name: Push docker image to the hub + run: docker push rickvdstaaij/move-to-dropbox:latest diff --git a/.github/workflows/job--test-and-lint.yml b/.github/workflows/job--test-and-lint.yml new file mode 100644 index 0000000..b3e7db2 --- /dev/null +++ b/.github/workflows/job--test-and-lint.yml @@ -0,0 +1,48 @@ +name: Test and lint +on: + workflow_call: +jobs: [] +# eslint: +# name: ESLint +# runs-on: ubuntu-22.04 +# steps: +# - uses: actions/checkout@v3 +# - uses: actions/setup-node@v3 +# with: +# node-version: 20 +# +# - name: Install development dependencies +# run: yarn install --ignore-scripts +# +# - name: Run eslint check +# run: node_modules/.bin/eslint --ext ts,tsx . +# +# frontend-typescript: +# name: Frontend typescript +# runs-on: ubuntu-22.04 +# steps: +# - uses: actions/checkout@v3 +# - uses: actions/setup-node@v3 +# with: +# node-version: 20 +# +# - name: Install development dependencies +# run: yarn install --ignore-scripts +# +# - name: Check frontend typescript +# run: node_modules/.bin/tsc --noEmit --project ./frontend/tsconfig.json +# +# backend-typescript: +# name: Backend typescript +# runs-on: ubuntu-22.04 +# steps: +# - uses: actions/checkout@v3 +# - uses: actions/setup-node@v3 +# with: +# node-version: 20 +# +# - name: Install development dependencies +# run: yarn install --ignore-scripts +# +# - name: Check backend typescript +# run: node_modules/.bin/tsc --noEmit --project ./backend/tsconfig.json diff --git a/README.md b/README.md index 3b38184..27f829c 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ docker run \ --env DROPBOX_APP_KEY=redacted \ --env DROPBOX_APP_SECRET=redacted \ --env DROPBOX_REFRESH_TOKEN=redacted \ - registry.gitlab.com/futureportal/uploadtodropbox:latest + rickvdstaaij/move-to-dropbox:latest ``` ## Running with docker compose @@ -47,7 +47,7 @@ version: '3' services: dropbox: - image: registry.gitlab.com/futureportal/uploadtodropbox:latest + image: rickvdstaaij/move-to-dropbox:latest container_name: dropbox-backup-upload environment: - DROPBOX_APP_KEY=redacted