Skip to content

Commit

Permalink
- Update backend image to v1.0.0
Browse files Browse the repository at this point in the history
- Change pom.xml version to 1.0.0+11
- Add GitHub clean workflow
- Modify release workflow triggers
  • Loading branch information
Chip3211 committed Sep 18, 2024
1 parent 6452406 commit 9cbe24c
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 12 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/clean-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Clean workflow

on: workflow_dispatch

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
clean_images:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write
id-token: write

steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Remove untagged images
uses: dataaxiom/ghcr-cleanup-action@v1
with:
delete-untagged: true
token: ${{ secrets.GITHUB_TOKEN }}
13 changes: 4 additions & 9 deletions .github/workflows/release-workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
name: FlavorMate server build workflow
on:
pull_request:
branches: [ main ]
paths:
- 'src/**'
- '.github/workflows/release-workflow.yaml'
- 'pom.xml'
push:
tags: [ v* ]
branches: [ main ]

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -77,8 +70,10 @@ jobs:
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=true
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
2 changes: 1 addition & 1 deletion example/docker-compose-traefik.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
backend:
container_name: flavormate_backend
image: ghcr.io/flavormate/flavormate-server:latest
image: ghcr.io/flavormate/flavormate-server:v1.0.0
env_file: ".env"
volumes:
- ./data/backend/secret.key:/opt/app/secret.key
Expand Down
2 changes: 1 addition & 1 deletion example/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
backend:
container_name: flavormate_backend
image: ghcr.io/flavormate/flavormate-server:latest
image: ghcr.io/flavormate/flavormate-server:v1.0.0
env_file: ".env"
volumes:
- ./data/backend/secret.key:/opt/app/secret.key
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</parent>
<groupId>de.flavormate</groupId>
<artifactId>server</artifactId>
<version>1.0.0+10mc</version>
<version>1.0.0+11</version>
<name>FlavorMate</name>
<description>The backend for FlavorMate</description>
<properties>
Expand Down

0 comments on commit 9cbe24c

Please sign in to comment.