Skip to content
Merged
Show file tree
Hide file tree
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
42 changes: 19 additions & 23 deletions .github/workflows/deploy-image.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,44 @@
name: Create and publish a Docker image
name: Create and publish a Docker image to DockerHub

on:
release:
types: ['published']
types: [published]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
DOCKER_NAMESPACE: marbleclimate
DOCKER_REPOSITORY: log-parser

jobs:
build-and-push-image:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Checkout repository
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.DOCKER_NAMESPACE }}/${{ env.DOCKER_REPOSITORY }}

- name: Build and push Docker image
id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
uses: docker/build-push-action@v6
with:
context: .
push: true
provenance: mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,12 @@ where the code for this extension is located.

## Docker

Docker images for this project can be found at https://github.com/DACCS-Climate/log-parser/pkgs/container/log-parser
Docker images for this project can be found at https://hub.docker.com/r/marbleclimate/log-parser

To run the log parser with Docker:

```sh
docker run -it --rm ghcr.io/DACCS-Climate/log-parser:latest --help
docker run -it --rm marbleclimate/log-parser:latest --help
```

This is the equivalent of installing the Log Parser locally and running:
Expand All @@ -276,7 +276,7 @@ The docker images also contain all extensions by default and they can be run by
if you'd like to run the `prometheus` extension:

```sh
docker run -it --rm --entrypoint log-parser-prometheus ghcr.io/DACCS-Climate/log-parser:latest --help
docker run -it --rm --entrypoint marbleclimate/log-parser:latest --help
```

The entrypoint for all extensions is `log-parser-<name>` where `<name>` is the name of the extension.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "log_parser"
version = "1.0.0"
version = "1.0.1"
description = "A simple asynchronous log file parsing library"
readme = "README.md"
requires-python = ">=3.12"
Expand Down