From 1bdf6b7f8283986cc2892aaf7aff1610c860b4d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marques?= Date: Thu, 21 Jan 2021 14:37:40 +0000 Subject: [PATCH] Aplly fixes and suggestions From https://github.com/Tecnativa/docker-socket-proxy/pull/40 --- src/.github/workflows/ci.yml.jinja | 14 ++++---------- src/README.md.jinja | 2 +- .../conftest.py.jinja | 2 +- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/.github/workflows/ci.yml.jinja b/src/.github/workflows/ci.yml.jinja index da81892..62f9461 100644 --- a/src/.github/workflows/ci.yml.jinja +++ b/src/.github/workflows/ci.yml.jinja @@ -31,7 +31,7 @@ env: jobs: {%- if pytest %} build-test: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: python: @@ -39,10 +39,8 @@ jobs: - {{ version }} {%- endfor %} steps: - # Prepare Docker environment + # Prepare environment - uses: actions/checkout@v2 - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 # Set up and run tests - name: Install python uses: actions/setup-python@v1 @@ -70,7 +68,7 @@ jobs: - run: poetry run pytest --prebuild {%- endif %} build-push: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 services: registry: image: registry:2 @@ -100,11 +98,9 @@ jobs: with: driver-opts: network=host install: true - - name: Get date - run: echo "BUILD_DATE=$(date --rfc-3339 ns)" >> $GITHUB_ENV # Build and push - name: Docker meta for local images - id: docker_meta_private + id: docker_meta_local uses: crazy-max/ghaction-docker-meta@v1 with: {%- raw %} @@ -131,7 +127,6 @@ jobs: labels: ${{ steps.docker_meta_local.outputs.labels }} tags: ${{ steps.docker_meta_local.outputs.tags }} build-args: | - BUILD_DATE=${{ env.BUILD_DATE }} VCS_REF=${{ github.sha }} {%- endraw %} {% if dockerhub_image or push_to_ghcr -%} @@ -191,7 +186,6 @@ jobs: labels: ${{ steps.docker_meta_public.outputs.labels }} tags: ${{ steps.docker_meta_public.outputs.tags }} build-args: | - BUILD_DATE=${{ env.BUILD_DATE }} VCS_REF=${{ github.sha }} {%- endraw %} {% endif %} diff --git a/src/README.md.jinja b/src/README.md.jinja index e899d78..2e3157f 100644 --- a/src/README.md.jinja +++ b/src/README.md.jinja @@ -1,3 +1,3 @@ -[![Last template update](https://img.shields.io/badge/last%20template%20update-{{ _copier_answers._commit|replace('-', '--') }}-informational)](https://github.com/Tecnativa/image-template/tree/{{ _copier_answers._commit }}) +[![Last image-template](https://img.shields.io/badge/last%20template%20update-{{ _copier_answers._commit|replace('-', '--') }}-informational)](https://github.com/Tecnativa/image-template/tree/{{ _copier_answers._commit }}) # {{ project_name }} diff --git a/src/{% if pytest %}tests{% endif %}/conftest.py.jinja b/src/{% if pytest %}tests{% endif %}/conftest.py.jinja index e74bd4e..dc05545 100644 --- a/src/{% if pytest %}tests{% endif %}/conftest.py.jinja +++ b/src/{% if pytest %}tests{% endif %}/conftest.py.jinja @@ -15,7 +15,7 @@ def pytest_addoption(parser): parser.addoption( "--image", action="store", - default="{{ project_name }}-test:latest", + default="test:{{ project_name }}", help="Specify testing image name", )