diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 4fced40..07b50b1 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -17,7 +17,7 @@ Feel free to open an issue if you have any questions. ### Code of conduct and guidelines -First of all, we expect everyone (contributors and maintainers alike) to respect the [Code of conduct](https://github.com/luketainton/FHeD/blob/master/.github/CODE_OF_CONDUCT.md). It is not a recommendation, it is mandatory. +First of all, we expect everyone (contributors and maintainers alike) to respect the [Code of conduct](https://github.com/luketainton/FHeD/blob/main/.github/CODE_OF_CONDUCT.md). It is not a recommendation, it is mandatory. For all contributions, please respect the following guidelines: @@ -38,6 +38,6 @@ feel free to open an issue to present your idea. The general process to submit a contribution is as follow: 1. Create your own fork of the code 2. Make you changes in a new branch in your fork (not main) -3. Make sure to fill the [pull request](https://github.com/luketainton/FHeD/blob/master/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md) properly. +3. Make sure to fill the [pull request](https://github.com/luketainton/FHeD/blob/main/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md) properly. ### Happy coding :metal: diff --git a/.github/issue-branch.yml b/.github/issue-branch.yml index 6b49f73..c2ed9ff 100644 --- a/.github/issue-branch.yml +++ b/.github/issue-branch.yml @@ -1,6 +1,6 @@ mode: auto silent: false -branchName: '${issue.number}' +branchName: "${issue.number}" branches: - label: type:feature prefix: feat- diff --git a/.github/workflows/autobranch.yml b/.github/workflows/autobranch.yml index d164ef7..91be7ef 100644 --- a/.github/workflows/autobranch.yml +++ b/.github/workflows/autobranch.yml @@ -1,14 +1,14 @@ name: Auto-create branches on: - issues: - types: [assigned] + issues: + types: [assigned] jobs: - create_issue_branch_job: - runs-on: ubuntu-latest - steps: - - name: Create Issue Branch - uses: robvanderleek/create-issue-branch@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + create_issue_branch_job: + runs-on: ubuntu-latest + steps: + - name: Create Issue Branch + uses: robvanderleek/create-issue-branch@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b6a215c..c815dca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,37 +1,37 @@ name: Deploy on: push: - branches: main + branches: [main] jobs: tests: - name: Tests - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Setup PHP with Xdebug - uses: shivammathur/setup-php@v2 - with: - php-version: '8.1' - coverage: xdebug - - name: Install dependencies with composer - run: composer update --no-ansi --no-interaction --no-progress - - name: Run tests with phpunit/phpunit - run: vendor/bin/phpunit --coverage-clover=coverage.xml - - name: Fix code coverage paths - run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml - - name: SonarCloud Scan - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + name: Tests + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup PHP with Xdebug + uses: shivammathur/setup-php@v2 + with: + php-version: "8.1" + coverage: xdebug + - name: Install dependencies with composer + run: composer update --no-ansi --no-interaction --no-progress + - name: Run tests with phpunit/phpunit + run: vendor/bin/phpunit --coverage-clover=coverage.xml + - name: Fix code coverage paths + run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} release-on-push: runs-on: ubuntu-latest - outputs: + outputs: ver: ${{ steps.release.outputs.version }} tag: ${{ steps.release.outputs.tag_name }} env: @@ -53,12 +53,12 @@ jobs: runs-on: ubuntu-latest needs: [tests, release-on-push] steps: - - uses: actions/checkout@v3 - - name: Login to GitHub Container Registry - run: echo ${{ secrets.PAT }} | docker login ghcr.io -u luketainton --password-stdin - - name: Build image for GitHub Container Registry - run: docker build . --file Dockerfile --tag ghcr.io/luketainton/fhed:${{ needs.release-on-push.outputs.ver }} --tag ghcr.io/luketainton/fhed:latest - - name: Push image to GitHub Container Registry - run: | - docker push ghcr.io/luketainton/fhed:latest - docker push ghcr.io/luketainton/fhed:${{ needs.release-on-push.outputs.ver }} + - uses: actions/checkout@v3 + - name: Login to GitHub Container Registry + run: echo ${{ secrets.GHCR_ACCESS_TOKEN }} | docker login ghcr.io -u luketainton --password-stdin + - name: Build image for GitHub Container Registry + run: docker build . --file Dockerfile --tag ghcr.io/luketainton/fhed:${{ needs.release-on-push.outputs.ver }} --tag ghcr.io/luketainton/fhed:latest + - name: Push image to GitHub Container Registry + run: | + docker push ghcr.io/luketainton/fhed:latest + docker push ghcr.io/luketainton/fhed:${{ needs.release-on-push.outputs.ver }} diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 8694e20..a11ce15 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -6,8 +6,8 @@ jobs: greeting: runs-on: ubuntu-latest steps: - - uses: actions/first-interaction@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-message: 'Welcome! Thank you for opening your first issue on FHeD. Please see the [contributing guidelines](https://github.com/luketainton/FHeD/blob/main/.github/CONTRIBUTING.md) for more information.' - pr-message: 'Thank you for opening your first pull request on FHeD! Please see the [contributing guidelines](https://github.com/luketainton/FHeD/blob/main/.github/CONTRIBUTING.md) to ensure your PR is ready for merge.' + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: "Welcome! Thank you for opening your first issue on FHeD. Please see the [contributing guidelines](https://github.com/luketainton/FHeD/blob/main/.github/CONTRIBUTING.md) for more information." + pr-message: "Thank you for opening your first pull request on FHeD! Please see the [contributing guidelines](https://github.com/luketainton/FHeD/blob/main/.github/CONTRIBUTING.md) to ensure your PR is ready for merge." diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index d420afa..fb27e08 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -2,18 +2,17 @@ name: Stale issues and PRs on: schedule: - - cron: "0 0 * * *" + - cron: "0 0 * * *" jobs: stale: - runs-on: ubuntu-latest steps: - - uses: actions/stale@v8 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'This issue has been marked as stale due to inactivity. If this issue is still ongoing, please leave a comment.' - stale-pr-message: 'This pull request has been marked as stale due to inactivity. If this issue is still ongoing, please leave a comment.' - stale-issue-label: 'status:stale' - stale-pr-label: 'status:stale' + - uses: actions/stale@v8 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: "This issue has been marked as stale due to inactivity. If this issue is still ongoing, please leave a comment." + stale-pr-message: "This pull request has been marked as stale due to inactivity. If this issue is still ongoing, please leave a comment." + stale-issue-label: "status:stale" + stale-pr-label: "status:stale" diff --git a/.gitlab-archive/.gitlab-ci.yml b/.gitlab-archive/.gitlab-ci.yml index 1a2a837..aaa81ef 100644 --- a/.gitlab-archive/.gitlab-ci.yml +++ b/.gitlab-archive/.gitlab-ci.yml @@ -1,18 +1,18 @@ stages: -- build + - build build: stage: build only: - - tags + - tags image: docker:24.0.2 services: - - docker:24.0.2-dind + - docker:24.0.2-dind variables: IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG" script: - - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - - docker build -t $CI_REGISTRY_IMAGE:latest -t $IMAGE_TAG . - - docker build -t $IMAGE_TAG -t $CI_REGISTRY_IMAGE:latest . - - docker push $IMAGE_TAG - - docker push $CI_REGISTRY_IMAGE:latest + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + - docker build -t $CI_REGISTRY_IMAGE:latest -t $IMAGE_TAG . + - docker build -t $IMAGE_TAG -t $CI_REGISTRY_IMAGE:latest . + - docker push $IMAGE_TAG + - docker push $CI_REGISTRY_IMAGE:latest diff --git a/renovate.json b/renovate.json index f45d8f1..c5820bb 100644 --- a/renovate.json +++ b/renovate.json @@ -2,4 +2,4 @@ "extends": [ "config:base" ] -} +} \ No newline at end of file