Skip to content

Commit

Permalink
Improve time and docker container (#37)
Browse files Browse the repository at this point in the history
* improve generation time

Signed-off-by: Avinal Kumar <[email protected]>

* permission issue fixed

Signed-off-by: Avinal Kumar <[email protected]>
  • Loading branch information
avinal committed Aug 26, 2021
1 parent 042a82d commit c8465a8
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 34 deletions.
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

19 changes: 5 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
# Copyright (c) 2020 Avinal Kumar
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Avinal Kumar <[email protected]>
#
# Distributed under the terms of MIT License
#
# The full license is in the file LICENSE, distributed with this software.

FROM ubuntu:latest
FROM ghcr.io/avinal/lark:1.0.0

# Add files to docker
ADD requirements.txt main.py entrypoint.sh colors.json /

# run update and install packages
RUN apt-get update && apt-get install -y git python3.8 python3-pip

# install requirements
RUN pip3 install -r requirements.txt

# grant permissions
RUN chmod +x entrypoint.sh
ADD main.py entrypoint.sh colors.json /

# run final script
CMD python3 /main.py && /entrypoint.sh
CMD python3 /main.py && /entrypoint.sh
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align=center><img src="/waka.png"></p>
<p align=center><a href="https://github.com/avinal/Profile-Readme-WakaTime/blob/master/LICENSE"><img src="https://img.shields.io/github/license/avinal/Profile-Readme-WakaTime" alt="License"></a> <a href="https://github.com/avinal/Profile-Readme-WakaTime/releases"><img src="https://img.shields.io/github/v/release/avinal/Profile-Readme-WakaTime" alt="Releases"></a> <img src="https://github.com/avinal/avinal/workflows/Build%20Graph/badge.svg" alt="Build"> <img src="https://wakatime.com/badge/github/avinal/Profile-Readme-WakaTime.svg" alt="Time Tracked"> <a href="https://github.com/avinal/Profile-Readme-WakaTime/discussions"><img src="https://img.shields.io/badge/QnA-Discussions-blueviolet"></a></p>
<p align=center><a href="https://github.com/avinal/Profile-Readme-WakaTime/blob/master/LICENSE"><img src="https://img.shields.io/github/license/avinal/Profile-Readme-WakaTime" alt="License"></a> <a href="https://github.com/avinal/Profile-Readme-WakaTime/releases"><img src="https://img.shields.io/github/v/release/avinal/Profile-Readme-WakaTime" alt="Releases"></a> <a href="https://github.com/avinal/lark"><img src="https://img.shields.io/badge/uses-avinal%2Flark-blueviolet"></a> <img src="https://github.com/avinal/avinal/workflows/Build%20Graph/badge.svg" alt="Build"> <img src="https://wakatime.com/badge/github/avinal/Profile-Readme-WakaTime.svg" alt="Time Tracked"> <a href="https://github.com/avinal/Profile-Readme-WakaTime/discussions"><img src="https://img.shields.io/badge/QnA-Discussions-blueviolet"></a></p>

If you use WakaTime to track your coding activity. You can add that to your README as a bar graph or embed in your blog/portfolio. Just add this action to any of your repository and there you have it. See mine below.

Expand Down
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Avinal Kumar <[email protected]>
#
# Distributed under the terms of MIT License
# The full license is in the file LICENSE, distributed with this software.

name: 'WakaTime Stat Update Action'
author: Avinal
description: 'Generate a WakaTime activity bar graph to be used in the README.md or embedded in web-page'
Expand Down
6 changes: 3 additions & 3 deletions entrypoint.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#! /bin/bash

# Copyright (c) 2020 Avinal Kumar
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Avinal Kumar <[email protected]>
#
# Distributed under the terms of MIT License
#
# The full license is in the file LICENSE, distributed with this software.

# constants
Expand Down Expand Up @@ -59,7 +59,7 @@ fi
cp stat.svg "${repository}/images"
check_success "new image copied" "error: cannot replace image"

cd "${repository}"
cd "${repository}" || exit

git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "GitHub Actions"
Expand Down
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2020 Avinal Kumar
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Avinal Kumar <[email protected]>
#
# Distributed under the terms of MIT License
#
# The full license is in the file LICENSE, distributed with this software.

import datetime
Expand Down
3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

0 comments on commit c8465a8

Please sign in to comment.