Skip to content

Commit

Permalink
Attemp to CICD for Docker push
Browse files Browse the repository at this point in the history
  • Loading branch information
isontheline committed Jun 4, 2024
1 parent 30c1194 commit 6fbbf90
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,33 @@ jobs:

- 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: ./backend/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Push Release
if: github.ref == 'refs/heads/main'
Expand Down

0 comments on commit 6fbbf90

Please sign in to comment.