Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
dafik committed Nov 18, 2023
1 parent 3940c80 commit 3306c1d
Showing 1 changed file with 36 additions and 8 deletions.
44 changes: 36 additions & 8 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
packages: write
steps:
- uses: actions/checkout@v3

- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v2
Expand All @@ -23,6 +24,7 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Cache angular
id: cache-angular
uses: actions/cache@v2
Expand All @@ -31,22 +33,48 @@ jobs:
with:
# caching node_modules
path: config/editor/.angular
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-build-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Cache app target
id: cache-app
uses: actions/cache@v2
env:
cache-name: cache-app
with:
# caching node_modules
path: app/target/*-dep.jar
key: ${{ runner.os }}-build-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Publish package
run: mvn --batch-mode -DskipTests deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


docker:
needs: [publish]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

Expand All @@ -61,10 +89,10 @@ jobs:

- name: Run Buildx
run: |
cp ./app/target/app-0.0.5-dep.jar ./docker/std/sbc2ha.jar
docker buildx build \
--platform linux/amd64,linux/arm/v7,linux/arm64 \
--output "type=image,push=false" \
--file ./docker/std/Dockerfile ./docker/std \
--tag sbc2ha/sbc2ha:${{ github.ref_name }} --tag sbc2ha/sbc2ha:latest \
--push
cp ./app/target/app-${{ github.ref_name }}-dep.jar ./docker/std/sbc2ha.jar
docker buildx build \
--platform linux/amd64,linux/arm/v7,linux/arm64 \
--output "type=image,push=false" \
--file ./docker/std/Dockerfile ./docker/std \
--tag sbc2ha/sbc2ha:${{ github.ref_name }} --tag sbc2ha/sbc2ha:latest \
--push

0 comments on commit 3306c1d

Please sign in to comment.