Skip to content

pre-commit: update packages #49

pre-commit: update packages

pre-commit: update packages #49

name: build and push container image
on:
push:
branches:
- main
tags:
- '*.*.*'
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
filter: tree:0
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install packages
run: sudo apt-get install -y make libarchive-tools unzip wget
- name: build
run: make
- name: set version
run: echo "VERSION=$(lein pprint --no-pretty -- :version)" >> $GITHUB_ENV
- name: docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}},value=${{ env.VERSION }},enable=${{ startsWith(github.ref, 'refs/tags/') }}
type=semver,pattern={{major}}.{{minor}},value=${{ env.VERSION }},enable=${{ startsWith(github.ref, 'refs/tags/') }}
type=semver,pattern={{major}},value=${{ env.VERSION }},enable=${{ startsWith(github.ref, 'refs/tags/') }}
type=sha,priority=1000
type=raw,value=devel,enable=true
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
- name: build and push
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
build-args: |
VERSION=${{ env.VERSION }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}