Skip to content

Add publish action.

Add publish action. #9

Workflow file for this run

name: Docker Image CI
on:
pull_request:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Install clojure tools
uses: DeLaGuardo/[email protected]
with:
lein: 2.9.1
- name: Build Uberjar
run: lein uberjar
- name: Build the Docker image
run: docker build . --file Dockerfile --tag pronouns.alysbrooks.com:latest --tag pronouns.alysbrooks.com:${{ github.ref_name }} --tag pronouns.alysbrooks.com:$(date +%s) --tag ghcr.io/alysbrooks/pronouns.alysbrooks.com:${{ github.ref_name}}
- name: Log in to GitHub's Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish the Docker image
run: docker push ghcr.io/alysbrooks/pronouns.alysbrooks.com:${{ github.ref_name}}