소스 검색

Add some container labels

Signed-off-by: Sean Young <sean@mess.org>
Sean Young 4 년 전
부모
커밋
068e7ec574
4개의 변경된 파일12개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 0
      .github/Dockerfile
  2. 3 1
      .github/workflows/release.yml
  3. 3 1
      .github/workflows/test.yml
  4. 3 0
      Dockerfile

+ 3 - 0
.github/Dockerfile

@@ -1,5 +1,8 @@
 FROM ubuntu:20.04 as builder
 
+LABEL org.opencontainers.image.licenses="Apache-2.0" \
+    org.opencontainers.image.description="CI container for github actions"
+
 ENV DEBIAN_FRONTEND=noninteractive
 RUN apt-get update -y
 RUN apt-get upgrade -y

+ 3 - 1
.github/workflows/release.yml

@@ -172,7 +172,9 @@ jobs:
     steps:
     - name: Checkout sources
       uses: actions/checkout@v2
-    - run: docker build . -t ghcr.io/${GITHUB_REPOSITORY}:${GITHUB_REF/refs\/tags\//}
+    - run: |
+        docker build . -t ghcr.io/${GITHUB_REPOSITORY}:${GITHUB_REF/refs\/tags\//} \
+            --label org.opencontainers.image.description="Solidity Compiler for Solana, Substrate, and ewasm version $(git describe --tags)"
     - run: |
         echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
         docker push ghcr.io/${GITHUB_REPOSITORY}:${GITHUB_REF/refs\/tags\//}

+ 3 - 1
.github/workflows/test.yml

@@ -131,7 +131,9 @@ jobs:
       with:
         # Make sure "git describe --tags" works for solang --version
         fetch-depth: 0
-    - run: docker build . -t ghcr.io/${GITHUB_REPOSITORY}:latest
+    - run: |
+          docker build . -t ghcr.io/${GITHUB_REPOSITORY}:latest \
+            --label org.opencontainers.image.description="Solidity Compiler for Solana, Substrate, and ewasm version $(git describe --tags)"
     - name: Push to github container registry
       if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
       run: |

+ 3 - 0
Dockerfile

@@ -18,4 +18,7 @@ RUN cargo build --release
 FROM ubuntu:20.04
 COPY --from=builder /src/target/release/solang /usr/bin/solang
 
+LABEL org.opencontainers.image.title="Solang Solidity Compiler" \
+	org.opencontainers.image.licenses="Apache-2.0"
+
 ENTRYPOINT ["/usr/bin/solang"]