Skip to content

Commit

Permalink
update project config
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Dec 5, 2023
1 parent f1fe154 commit 2215d76
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 80 deletions.
4 changes: 1 addition & 3 deletions .ci/maven-settings.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">

<servers>
<server>
<id>github-commits</id>
<username>${env.GITHUB_USER}</username>
<password>${env.GITHUB_API_KEY}</password>
</server>
</servers>

</settings>
2 changes: 1 addition & 1 deletion .ci/maven-toolchains.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml version="1.0" encoding="UTF-8"?>
<toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd">
<toolchain>
Expand Down
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ updates:
prefix-development: chore
include: scope
labels:
- pinned
- dependencies
- gha
- package-ecosystem: maven
Expand All @@ -25,5 +26,6 @@ updates:
prefix-development: chore
include: scope
labels:
- pinned
- dependencies
- mvn
74 changes: 64 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# SPDX-FileCopyrightText: © Sebastian Thomschke and contributors.
# SPDX-FileContributor: Sebastian Thomschke
# SPDX-License-Identifier: EPL-2.0
# SPDX-ArtifactOfProjectHomePage: https://github.com/sebthom/findview-eclipse-plugin
#
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: Build

Expand Down Expand Up @@ -46,11 +51,20 @@ env:
KEYSTORE_PATH: /tmp/sebthom.github.io.p12
KEYSTORE_PW: whatever


jobs:

build:
###########################################################
maven-build:
###########################################################
runs-on: ubuntu-latest
concurrency: ci-${{ github.ref }}


# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false


steps:
- name: Show environment variables
Expand All @@ -76,6 +90,12 @@ jobs:
java-version: ${{ env.JAVA_VERSION }}


- name: "Install: Maven"
uses: stCarolas/setup-maven@v4.5 # https://github.com/stCarolas/setup-maven
with:
maven-version: 3.9.6


- name: "Cache: Restore"
id: cache-restore
if: ${{ !env.ACT }} # https://github.com/nektos/act#skipping-steps
Expand All @@ -88,12 +108,6 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('build.target') }}-${{ hashFiles('**/pom.xml') }}


- name: "Install: Maven"
uses: stCarolas/setup-maven@v4.5 # https://github.com/stCarolas/setup-maven
with:
maven-version: 3.9.5


- name: Get Signing Certificate
if: ${{ github.ref_name == 'main' && !env.ACT }}
env:
Expand All @@ -111,7 +125,6 @@ jobs:
- name: Build with Maven
id: maven-build
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_API_KEY: ${{ github.token }}
Expand Down Expand Up @@ -165,7 +178,7 @@ jobs:
# https://cli.github.com/manual/gh_release_create
run: |
GH_DEBUG=1 gh release create "$RELEASE_NAME" \
--prerelease \
--title "latest" \
--latest \
--notes "${{ github.event.head_commit.message }}" \
--target "${{ github.sha }}" \
Expand Down Expand Up @@ -227,6 +240,7 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: |
gh extension install actions/gh-actions-cache
# "|| true" is to avoid "Error: Resource not accessible by integration" from failing the job
gh actions-cache delete ${{ steps.cache-restore.outputs.cache-primary-key }} --confirm || true
- name: "Cache: Update"
Expand Down Expand Up @@ -259,8 +273,48 @@ jobs:
echo "start_ssh_session=true" | tee -a "$GITHUB_OUTPUT"
fi
- name: "SSH session for debugging: start"
uses: mxschmitt/action-tmate@v3 # https://github.com/mxschmitt/action-tmate
if: always() && steps.DEBUG_SSH_SESSSION_CHECK.outputs.start_ssh_session
with:
limit-access-to-actor: ${{ inputs.debug-with-ssh-only-for-actor }}


###########################################################
dependabot-pr-auto-merge:
###########################################################
needs: maven-build
if: ${{ github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' }}
runs-on: ubuntu-latest

concurrency: dependabot-pr-auto-merge

permissions:
contents: write
pull-requests: write

steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1 # https://github.com/dependabot/fetch-metadata/
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"


- name: Enable auto-merge for Dependabot PRs
if: |
${{
(
steps.dependabot-metadata.outputs.package-ecosystem == 'github-actions' &&
steps.metadata.outputs.update-type == 'version-update:semver-major'
) || (
steps.dependabot-metadata.outputs.package-ecosystem == 'maven' &&
steps.metadata.outputs.update-type == 'version-update:semver-minor'
)
}}
run: |
gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
42 changes: 0 additions & 42 deletions .github/workflows/dependabot-auto-merge.yml

This file was deleted.

52 changes: 28 additions & 24 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
Expand All @@ -22,17 +22,17 @@ community include:
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

Expand Down Expand Up @@ -60,7 +60,7 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
https://github.com/sebthom/findview-eclipse-plugin/issues.
https://vegardit.com/en/legal/
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand All @@ -82,15 +82,15 @@ behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.
**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

Expand All @@ -106,23 +106,27 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.
**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

0 comments on commit 2215d76

Please sign in to comment.