Feature/integrate with cc tools #794
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# SPDX-License-Identifier: Apache-2.0 | |
# | |
name: FPC test | |
on: | |
workflow_dispatch: | |
push: | |
paths-ignore: | |
- '**.md' | |
- '.github/workflows/**' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- '.github/workflows/**' | |
permissions: | |
contents: read | |
packages: write | |
env: | |
DOCKER_REGISTRY: 'ghcr.io' | |
PUSH_TO_MAIN: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
jobs: | |
docker: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-22.04 | |
os-version: 22.04 | |
os-name: jammy | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
docker: | |
- 'utils/docker/**' | |
- name: build dev image | |
if: steps.filter.outputs.docker == 'true' | |
env: | |
DOCKER_QUIET_BUILD: 1 | |
run: | | |
DOCKER_BUILD_OPTS="--build-arg UBUNTU_VERSION=${{ matrix.os-version }} --build-arg UBUNTU_NAME=${{ matrix.os-name }}" \ | |
make -C utils/docker build build-dev | |
- name: fetch dev image | |
if: steps.filter.outputs.docker == 'false' | |
env: | |
DOCKER_QUIET_BUILD: 1 | |
run: | | |
DOCKER_BUILD_OPTS="--build-arg UBUNTU_VERSION=${{ matrix.os-version }} --build-arg UBUNTU_NAME=${{ matrix.os-name }}" \ | |
make -C utils/docker pull pull-dev | |
- name: run make inside dev container | |
env: | |
DOCKER_DEV_CI_MODE: 1 | |
DOCKER_QUIET_BUILD: 1 | |
run: | | |
DOCKER_BUILD_OPTS="--build-arg UBUNTU_VERSION=${{ matrix.os-version }} --build-arg UBUNTU_NAME=${{ matrix.os-name }}" \ | |
GOMODCACHE_PATH=$(go env GOMODCACHE) \ | |
make -C utils/docker run-dev DOCKER_DEV_OPTIONAL_CMD='env IS_CI_RUNNING=true \ | |
make all' | |
# | |
# continue only if we push to main and rebuild docker images | |
# | |
- name: Login to the ${{ env.DOCKER_REGISTRY }} Container Registry | |
if: env.PUSH_TO_MAIN == 'true' && steps.filter.outputs.docker == 'true' | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.DOCKER_REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: publish images | |
if: env.PUSH_TO_MAIN == 'true' && steps.filter.outputs.docker == 'true' | |
run: | | |
make -C utils/docker publish |