Skip to content

fix: try different mount #5

fix: try different mount

fix: try different mount #5

Workflow file for this run

#
# SPDX-License-Identifier: Apache-2.0
#
name: FPC test
on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
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-20.04
os-version: 20.04
os-name: focal
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 }}" \
make -C utils/docker run-dev PACKAGE_MOUNT='-v ~/go/pkg/mod/:/project/pkg/mod/' 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