Skip to content

Merge pull request #215 from WilhelmusLab/fix(workflow)--tracking-not… #82

Merge pull request #215 from WilhelmusLab/fix(workflow)--tracking-not…

Merge pull request #215 from WilhelmusLab/fix(workflow)--tracking-not… #82

# from https://docs.github.com/en/actions/guides/publishing-docker-images
name: Build and PushContainer - SOIT
on:
push:
branches:
- 'main'
tags:
- 'v*.*.*'
pull_request:
branches:
- 'main'
env:
REGISTRY: hub.docker.com
IMAGE_NAME: brownccv/icefloetracker-soit
TEST_TAG: brownccv/icefloetracker-soit:test
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
username: ccvbot
password: ${{ secrets.CCVBOT_DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: ./satellite-overpass-identification-tool
platforms: linux/amd64
load: true
tags: ${{ env.TEST_TAG }}
- name: Test SOIT
run: |
docker run -v `pwd`:/app -w /app --rm ${{ env.TEST_TAG }} \
-u ${{ secrets.SPACEUSER }} -p ${{ secrets.SPACEPSWD }} \
--startdate 2013-03-31 --enddate 2013-05-01 \
--lat 76.0015 --lon -18.4315 \
--csvoutpath .
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./satellite-overpass-identification-tool
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}