Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

update go modules

update go modules #23

Workflow file for this run

name: build
on:
push:
branches:
- master
tags:
pull_request:
jobs:
build-images:
name: Build Docker images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up QEMU
uses: docker/setup-qemu-action@v3
- name: set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: build docker image without pushing (only outside master)
if: ${{ github.ref != 'refs/heads/master' }}
run: |
docker buildx build \
--platform linux/amd64 .
- name: build docker image for ghcr.io and DockerHub
if: ${{ github.ref == 'refs/heads/master' }}
env:
GITHUB_PACKAGE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USER: bookingcom
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
DOCKER_HUB_USER: paskal
USERNAME: ${{ github.actor }}
run: |
echo ${GITHUB_PACKAGE_TOKEN} | docker login ghcr.io -u ${USERNAME} --password-stdin
echo ${DOCKER_HUB_TOKEN} | docker login -u ${DOCKER_HUB_USER} --password-stdin
docker buildx build --push \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/${GITHUB_USER}/cloudsec-metrics:latest -t ${DOCKER_HUB_USER}/cloudsec-metrics:latest .