Skip to content

Make clippy happy

Make clippy happy #135

Workflow file for this run

name: Build Docker Images
on: [push]
jobs:
build-docker-image:
strategy:
matrix:
target-cpu: ["znver3", "znver2", "skylake", "haswell", "sandybridge", "x86-64"]
name: Build for ${{ matrix.target-cpu }}
env:
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_TARGET_ACCOUNT: ${{ secrets.DOCKERHUB_TARGET }}
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
if: env.DOCKER_USERNAME
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Login to ghcr
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Convert GITHUB_REPOSITORY into lowercase
run: |
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: Build Docker Image
run: |
docker build -t gateway-proxy:${{ matrix.target-cpu }} --build-arg TARGET_CPU=${{ matrix.target-cpu }} .
- name: Create manifest and push it
if: env.DOCKER_USERNAME && github.ref == 'refs/heads/main'
run: |
docker tag gateway-proxy:${{ matrix.target-cpu }} ${{ secrets.DOCKERHUB_TARGET }}/gateway-proxy:${{ matrix.target-cpu }}
docker push ${{ secrets.DOCKERHUB_TARGET }}/gateway-proxy:${{ matrix.target-cpu }}
docker tag gateway-proxy:${{ matrix.target-cpu }} ghcr.io/${REPO}:${{ matrix.target-cpu }}
docker push ghcr.io/${REPO}:${{ matrix.target-cpu }}