Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Images Build Issue with -race flag / Problème de construction des images Docker avec le paramètre -race #416

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
📦 NEW: Add Docker compilation bu CI/CD
  • Loading branch information
Pascal Canadas committed Sep 29, 2023

Verified

This commit was signed with the committer’s verified signature.
adityasingh-anyline Aditya Singh
commit a831fd5560795bfc512041470e23e11bd4ea2ac0
51 changes: 51 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Publication Docker image

on: [push]

jobs:
docker:
runs-on: ubuntu-latest
strategy:
matrix:
architecture: [linux/amd64, linux/aarch64]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
version: latest
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
id: buildx
with:
install: true
version: latest
use: true
- name: Cache Docker Image Layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build and Push Docker Image
uses: docker/build-push-action@v2
id: docker_build
with:
context: ./
file: ./Dockerfile
builder: ${{ steps.buildx.outputs.name }}
platforms: ${{ matrix.architecture }}
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/imaginaryprototype:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
- name: Verify
run: echo ${{ steps.docker_build.outputs.digest }}
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -50,6 +50,7 @@ RUN go mod download
COPY . .

# Run quality control
# RUN go test ./... -test.v -test.coverprofile=atomic .
RUN go test ./... -test.v -race -test.coverprofile=atomic .
RUN golangci-lint run .