Skip to content

Commit

Permalink
release docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
klandeck committed Apr 5, 2022
1 parent c206dc3 commit d7e348b
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 90 deletions.
90 changes: 0 additions & 90 deletions .github/workflows/main.yml

This file was deleted.

59 changes: 59 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Docker

on:
release:
types: [published]

env:
IMAGE_NAME: capt-mifune

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
env:
CI: false
- uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: yarn install
run: yarn --cwd ui install
- name: yarn generate api
run: yarn --cwd ui generate-backend-api
- name: yarn build
run: yarn --cwd ui build
env:
CI: false
- name: run maven
run: mvn -f server/pom.xml clean install

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: |
ghcr.io/${{ github.repository }}
- name: Build and push Docker images
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit d7e348b

Please sign in to comment.