Skip to content

Commit

Permalink
Split action jobs in separate workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaaano committed Apr 27, 2021
1 parent dda2794 commit 1eba48b
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 50 deletions.
58 changes: 9 additions & 49 deletions .github/workflows/quarkus.yml → .github/workflows/ci-native.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: quarkus-ci
name: ci-native

on:
push:
paths-ignore:
- "README.md"
- ".dockerignore"
- ".gitignore"
- "*.sh"
- "*.png"
paths:
- ".github/workflows/ci-native.yml"
- "src/**"
- "config/**"
- "liquibase/**"
- "docker-compose.yaml"
- "pom.xml"
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
Expand All @@ -20,52 +21,11 @@ on:
# * * * * *
- cron: "15 1 * * *"

# permissions:
# packages: none # Overriden by package 'Actions access'.

concurrency:
group: quarkus-ci
group: ci-native
cancel-in-progress: false

jobs:
build-jvm:
runs-on: ubuntu-latest
env:
MVN: mvn --show-version --batch-mode
steps:
- name: JDK 11
uses: actions/setup-java@v2
with:
java-version: "11"
distribution: "adopt"
- name: login registry.redhat.io
uses: docker/[email protected]
with:
registry: registry.redhat.io
username: ${{ secrets.REDHAT_USR }}
password: ${{ secrets.REDHAT_PWD }}
logout: true
- name: login ghcr.io
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
logout: true
- name: checkout
uses: actions/checkout@v2
- name: cache ~/.m2
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: mvn clean compile
run: $MVN clean compile
- name: mvn test
run: $MVN test
- name: mvn package -DskipTests -Dquarkus.container-image.push=true
run: $MVN package -Dquarkus.container-image.push=true -DskipTests
test-native:
runs-on: ubuntu-latest
env:
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: ci

on:
push:
paths:
- ".github/workflows/ci.yml"
- "src/**"
- "pom.xml"
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
- cron: "15 1 * * *"

# permissions:
# packages: none # Overriden by package 'Actions access'.

concurrency:
group: ci
cancel-in-progress: false

jobs:
build-jvm:
runs-on: ubuntu-latest
env:
MVN: mvn --show-version --batch-mode
steps:
- name: JDK 11
uses: actions/setup-java@v2
with:
java-version: "11"
distribution: "adopt"
- name: login registry.redhat.io
uses: docker/[email protected]
with:
registry: registry.redhat.io
username: ${{ secrets.REDHAT_USR }}
password: ${{ secrets.REDHAT_PWD }}
logout: true
- name: login ghcr.io
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
logout: true
- name: checkout
uses: actions/checkout@v2
- name: cache ~/.m2
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: mvn clean compile
run: $MVN clean compile
- name: mvn test
run: $MVN test
- name: mvn package -DskipTests -Dquarkus.container-image.push=true
run: $MVN package -Dquarkus.container-image.push=true -DskipTests
2 changes: 1 addition & 1 deletion .github/workflows/scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches: [master]
paths:
- 'src/**'
- "src/**"
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
Expand Down

0 comments on commit 1eba48b

Please sign in to comment.