Skip to content

Fixed gains.

Fixed gains. #365

Workflow file for this run

on: push
env:
IMAGE: ${{ secrets.DOCKER_HUB_USERNAME }}/sdr-scanner
PLATFORMS: linux/arm/v7,linux/arm64/v8,linux/amd64
CACHE_FROM: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/sdr-scanner:cache
CACHE_TO: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/sdr-scanner:cache,mode=max
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
cache-image: false
platforms: ${{ env.PLATFORMS }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build test
uses: docker/build-push-action@v6
with:
context: .
load: true
target: test
tags: ${{ env.IMAGE }}:test
cache-from: ${{ env.CACHE_FROM }}
- name: Build app
uses: docker/build-push-action@v6
with:
build-args: |
VERSION=${{ github.ref_name }}
COMMIT=${{ github.sha }}
context: .
cache-from: ${{ env.CACHE_FROM }}
- name: Run test
run: |
docker run --rm ${{ env.IMAGE }}:test
- name: Push development version
if: ${{ github.ref_type == 'branch' && contains(vars.CI_BRANCH, github.ref_name) }}
uses: docker/build-push-action@v6
with:
build-args: |
VERSION=${{ github.ref_name }}
COMMIT=${{ github.sha }}
context: .
push: true
platforms: ${{ env.PLATFORMS }}
tags: ${{ env.IMAGE }}:${{ github.ref_name }}
cache-from: ${{ env.CACHE_FROM }}
cache-to: ${{ env.CACHE_TO }}
- name: Push release version
if: ${{ github.ref_type == 'tag' }}
uses: docker/build-push-action@v6
with:
build-args: |
VERSION=${{ github.ref_name }}
COMMIT=${{ github.sha }}
context: .
push: true
platforms: ${{ env.PLATFORMS }}
tags: |
${{ env.IMAGE }}:latest
${{ env.IMAGE }}:${{ github.ref_name }}
cache-from: ${{ env.CACHE_FROM }}
cache-to: ${{ env.CACHE_TO }}