Skip to content

build(deps): Bump docker/build-push-action from 6.7.0 to 6.8.0 #1770

build(deps): Bump docker/build-push-action from 6.7.0 to 6.8.0

build(deps): Bump docker/build-push-action from 6.7.0 to 6.8.0 #1770

Workflow file for this run

# Copyright Contributors to the L3AF Project.
# SPDX-License-Identifier: Apache-2.0
#
# For documentation on the github environment, see
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
#
# For documentation on the syntax of this file, see
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: CI Ubuntu build
on:
pull_request: {}
push:
branches:
- main
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Setup Go 1.22.3
uses: actions/setup-go@df1a11710ed378b187f40c71eb3d6c08d82e7108
with:
go-version: '1.22.3'
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Set up environment
run: |
sudo apt-get update
sudo apt-get remove containerd.io
sudo apt-get install -y gcc libc-dev bash perl curl make docker docker.io
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Format
run: |
go install golang.org/x/tools/cmd/goimports@latest
res="$(goimports -l .)"
if [[ "$(printf '%s' "$res")" != '' ]]; then
echo "Unformatted source code:"
echo "$res"
exit 1
fi
- name: Vet
run: |
go vet ./...
- name: Test
run: |
go test ./...
go clean -modcache
- uses: dominikh/staticcheck-action@fe1dd0c3658873b46f8c9bb3291096a617310ca6
with:
version: "2024.1.1"
install-go: false
cache-key: "1.22.x"
- name: Build
run: |
make
- name: Copy files
if: github.ref == 'refs/heads/main'
run: |
sudo cp ./config/l3afd.cfg ./build-docker
sudo cp l3afd ./build-docker
- name: login to docker registry
if: github.ref == 'refs/heads/main'
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
username: ${{secrets.DOCKER_USERNAME}}
password: ${{secrets.DOCKER_TOKEN}}
- name: build and push docker image to registry
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@32945a339266b759abcbdc89316275140b0fc960
with:
context: ./build-docker
push: true
tags: linuxfoundationl3af/l3afd:latest
- name: upload l3afd binary
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
with:
name: l3afd-latest-linux-x86_64
path: l3afd