Skip to content

Commit 4afa904

Browse files
committed
Merge branch 'hotfix/0.1.5'
2 parents d3e40ed + 12eb448 commit 4afa904

File tree

3 files changed

+44
-55
lines changed

3 files changed

+44
-55
lines changed

.github/workflows/python.yml .github/workflows/ci-cd.yml

+43-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file is part of AsicVerifier and is released under
22
# the AGPL-3.0-only License: https://opensource.org/license/agpl-v3/
33

4-
name: Python
4+
name: CI/CD
55
on:
66
pull_request:
77
push:
@@ -80,12 +80,6 @@ jobs:
8080
env:
8181
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
8282
- name: Test coverage must be 100% passed!
83-
if:
84-
github.ref_type == 'tag' ||
85-
github.event_name == 'pull_request' ||
86-
contains('refs/heads/main refs/heads/develop', github.ref) ||
87-
startsWith(github.ref, 'refs/heads/release/') ||
88-
startsWith(github.ref, 'refs/heads/hotfix/')
8983
run: if [ "$(python -m coverage json -q -o /dev/stdout | jq .totals.percent_covered)" = "100" ]; then exit; else exit 1; fi
9084
pypi:
9185
name: PyPI
@@ -115,3 +109,45 @@ jobs:
115109
uses: pypa/gh-action-pypi-publish@release/v1
116110
with:
117111
skip-existing: true
112+
docker:
113+
name: Docker
114+
needs: pypi
115+
if: echo ${{ github.ref }} | egrep '^refs/tags/[0-9]+.[0-9]+.[0-9]+$'
116+
runs-on: ubuntu-latest
117+
environment:
118+
name: docker
119+
url: https://hub.docker.com/r/${{ github.repository }}
120+
steps:
121+
- name: Checkout
122+
uses: actions/checkout@v4
123+
with:
124+
fetch-depth: 0
125+
- name: Set up Docker Buildx
126+
uses: docker/setup-buildx-action@v3
127+
with:
128+
driver: docker
129+
- name: Login to Docker Hub
130+
uses: docker/login-action@v3
131+
with:
132+
username: ${{ github.repository_owner }}
133+
password: ${{ secrets.TOKEN }}
134+
- name: Build and push image
135+
uses: docker/build-push-action@v5
136+
with:
137+
context: .
138+
platforms: linux/amd64
139+
cache-from: |
140+
type=registry,ref=${{ github.repository }}
141+
type=registry,ref=niis/xroad-security-server-sidecar:7.0.4
142+
type=registry,ref=eclipse-temurin:8-alpine
143+
cache-to: type=inline
144+
tags: ${{ github.repository }}
145+
push: true
146+
- name: Update repo description
147+
uses: peter-evans/dockerhub-description@v3
148+
with:
149+
username: ${{ github.repository_owner }}
150+
password: ${{ secrets.TOKEN }}
151+
short-description: ${{ github.event.repository.description }}
152+
- name: Show package info
153+
run: docker run --platform linux/amd64 --rm --entrypoint pip ${{ github.repository }} show ${{ github.event.repository.name }} --verbose

.github/workflows/docker.yml

-46
This file was deleted.

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ the AGPL-3.0-only License: https://opensource.org/license/agpl-v3/
1010
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/asicverifier?logo=python&label=Python&labelColor=black)](https://pypi.org/project/asicverifier/)
1111
[![PyPI - Version](https://img.shields.io/pypi/v/asicverifier?logo=pypi&label=PyPI&labelColor=black)](https://pypi.org/project/asicverifier/)
1212
[![Docker Image Size (tag)](https://img.shields.io/docker/image-size/pipinfitriadi/asicverifier/latest?logo=Docker&label=latest&labelColor=black)](https://hub.docker.com/r/pipinfitriadi/asicverifier)
13-
[![GitHub Action - Python](https://img.shields.io/github/actions/workflow/status/pipinfitriadi/asicverifier/python.yml?logo=GitHub&label=Python&labelColor=black)](https://github.com/pipinfitriadi/asicverifier/actions/workflows/python.yml)
14-
[![GitHub Action - Docker](https://img.shields.io/github/actions/workflow/status/pipinfitriadi/asicverifier/docker.yml?logo=GitHub&label=Docker&labelColor=black)](https://github.com/pipinfitriadi/asicverifier/actions/workflows/docker.yml)
13+
[![GitHub Action](https://img.shields.io/github/actions/workflow/status/pipinfitriadi/asicverifier/ci-cd.yml?logo=GitHub&label=CI/CD&labelColor=black)](https://github.com/pipinfitriadi/asicverifier/actions/workflows/ci-cd.yml)
1514
[![Codecov](https://img.shields.io/codecov/c/github/pipinfitriadi/asicverifier?logo=codecov&label=Coverage&labelColor=black)](https://app.codecov.io/github/pipinfitriadi/asicverifier)
1615

1716
Asic Verifier for X-Road

0 commit comments

Comments
 (0)