File tree 3 files changed +66
-0
lines changed
3 files changed +66
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish in GitHub Package Registry
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' *'
7
+
8
+ env :
9
+ REGISTRY : ghcr.io
10
+ IMAGE_NAME : ${{ github.repository }}
11
+
12
+ jobs :
13
+ build-and-push-image :
14
+ runs-on : ubuntu-latest
15
+ permissions :
16
+ contents : read
17
+ packages : write
18
+
19
+ steps :
20
+ - name : Checkout repository
21
+ uses : actions/checkout@v3
22
+
23
+ - name : Log in to the Container registry
24
+ uses : docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
25
+ with :
26
+ registry : ${{ env.REGISTRY }}
27
+ username : ${{ github.actor }}
28
+ password : ${{ secrets.GITHUB_TOKEN }}
29
+
30
+ - name : Extract metadata (tags, labels) for Docker
31
+ id : meta
32
+ uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
33
+ with :
34
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
35
+
36
+ - name : Build and push Docker image
37
+ uses : docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
38
+ with :
39
+ context : .
40
+ push : true
41
+ tags : ${{ steps.meta.outputs.tags }}
42
+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change
1
+ FROM python:3.8
2
+
3
+ # Install isort
4
+ RUN pip install --no-cache-dir isort==5.12.0
5
+
6
+ # Set the entrypoint to isort
7
+ ENTRYPOINT ["isort" ]
Original file line number Diff line number Diff line change
1
+ # Dockerized isort
2
+
3
+ Quickly and easily use [ isort] ( https://pycqa.github.io/isort/ ) from docker
4
+
5
+ ## Usage
6
+
7
+ ``` sh
8
+ docker run --rm -v $( pwd) :/app/ ghcr.io/zetier/dockerized_isort .
9
+ ```
10
+
11
+ ## Tags
12
+
13
+ Tags will be formatted as ` <py_version>-<isort version> `
14
+
15
+ For example:
16
+
17
+ ` 3.8-5.12.0 ` is python 3.8 , isort version 5.12.0
You can’t perform that action at this time.
0 commit comments