Skip to content

Commit

Permalink
++
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaa6i committed Aug 8, 2024
1 parent 4ed1d6c commit 204637a
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 44 deletions.
88 changes: 45 additions & 43 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,49 @@
name: Docker CI
name: Build JAR in Container

on:
push:
pull_request:
workflow_dispatch:
push:
pull_request:
workflow_dispatch:

jobs:
build:
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:${{ github.sha }}

- name: List files in dist_keycloak
run: ls -l

- name: Upload dist_keycloak artifacts to release
uses: actions/upload-artifact@v2
with:
name: dist_keycloak-artifacts
path: ./dist_keycloak/keycloak-theme-for-kc-22-and-above.jar
if-no-files-found: warn

- name: Add git note
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git fetch origin "refs/notes/*:refs/notes/*"
git notes add -m "published" ${{ github.sha }}
git push origin refs/notes/commits
build:
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build Docker image
uses: docker/build-push-action@v2
with:
context: .
push: false # Don't push the Docker image
tags: temp-image:latest

- name: Create dist_keycloak directory
run: mkdir -p ./dist_keycloak

- name: Copy JAR file from Docker image
run: docker run --rm -v ${{ github.workspace }}/dist_keycloak:/dist temp-image:latest cp ./dist_keycloak/keycloak-theme-for-kc-22-and-above.jar /dist/keycloak-theme-for-kc-22-and-above.jar

- name: List files in dist_keycloak
run: ls -l ./dist_keycloak

- name: Upload dist_keycloak artifacts to release
uses: actions/upload-artifact@v2
with:
name: dist_keycloak-artifacts
path: ./dist_keycloak/keycloak-theme-for-kc-22-and-above.jar
if-no-files-found: warn

- name: Add git note
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git fetch origin "refs/notes/*:refs/notes/*"
git notes add -m "published" ${{ github.sha }}
git push origin refs/notes/commits
1 change: 0 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export default defineConfig({
keycloakify({
accountThemeImplementation: "none",
artifactId:"keycloakify-theme",
keycloakifyBuildDirPath: "build",
})
]
});

0 comments on commit 204637a

Please sign in to comment.