chore: update CI

This commit is contained in:
Kiran Shila
2025-12-13 13:13:57 -08:00
parent 8efd0a3f55
commit 97107b3fe6

View File

@@ -3,61 +3,61 @@ name: Main
on: push on: push
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }} IMAGE_NAME: ${{ github.repository }}
jobs: jobs:
build-and-publish: build-and-publish:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: write contents: write
packages: write packages: write
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v6
- name: Prepare java - name: Prepare java
uses: actions/setup-java@v2 uses: actions/setup-java@v3
with: with:
distribution: "adopt" distribution: "adopt"
java-version: "16" java-version: "22"
- name: Install clojure tools - name: Install clojure tools
uses: DeLaGuardo/setup-clojure@3.5 uses: DeLaGuardo/setup-clojure@13.4
with: with:
cli: 1.10.3.943 cli: latest
- name: Build bot and copy out jar for docker - name: Build bot and copy out jar for docker
shell: bash shell: bash
run: | run: |
clojure -T:build uber clojure -T:build uber
cp target/doplarr.jar docker cp target/doplarr.jar docker
- name: Release tagged version - name: Release tagged version
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
with: with:
files: | files: |
target/doplarr.jar target/doplarr.jar
config.edn config.edn
- name: Log in to the Container registry - name: Log in to the Container registry
uses: docker/login-action@v1 uses: docker/login-action@v3
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker - name: Extract metadata (tags, labels) for Docker
id: meta id: meta
uses: docker/metadata-action@v3 uses: docker/metadata-action@v5
with: with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v2 uses: docker/build-push-action@v6
with: with:
context: docker context: docker
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}