Moving Dockerfile #132
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build dRAGon Project | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: microsoft | |
java-version: 17 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: gradle/actions/setup-gradle@v3 | |
with: | |
gradle-version: 8.7 | |
- name: Display Tools Versions | |
run: gradle issueReportInfo | |
- name: Create Release | |
if: github.ref == 'refs/heads/main' | |
run: gradle createRelease | |
- name: Set Frontend Version | |
run: npm version from-git --no-git-tag-version --prefix frontend | |
- name: Set Docs Version | |
run: npm version from-git --no-git-tag-version --prefix docs | |
- name: Test dRAGon | |
run: gradle npmInstall npmLint checkstyleMain checkstyleTest test | |
- name: Build Documentation | |
run: npm install --prefix docs && npm run build --prefix docs | |
- name: Build dRAGon | |
run: gradle build -Pversion=$(gradle cV -q -Prelease.quiet) | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
dragon-okinawa/dragon | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Push Release | |
if: github.ref == 'refs/heads/main' | |
run: gradle pushRelease | |
- name: Deploy Documentation | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
if: github.ref == 'refs/heads/main' | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: docs/build |