Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/deploy-ghcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy to GHCR

on:
workflow_dispatch:

permissions:
contents: read
packages: write

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
Comment thread
LuftigerLuca marked this conversation as resolved.

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

- name: Extract version from build.gradle
id: version
run: echo "version=$(grep '^ version' build.gradle | sed 's/.*\"\(.*\)\".*/\1/')" >> $GITHUB_OUTPUT
Comment thread
LuftigerLuca marked this conversation as resolved.

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/alleslockr/alleslocker-backend:latest
ghcr.io/alleslockr/alleslocker-backend:${{ steps.version.outputs.version }}
Loading