Skip to content

added command option #17

added command option

added command option #17

Workflow file for this run

name: docker-ci
on:
push:
branches-ignore:
- "main"
paths:
- '.github/workflows/docker-ci.yml'
- '**.cs'
- 'Dockerfile'
- 'Dockerfile.Alpine'
env:
ALPINE_TAG: erikrose100/closeasteroids:alpine
LATEST_TAG: erikrose100/closeasteroids
jobs:
docker-latest:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and export to local images
uses: docker/build-push-action@v5
with:
load: true
tags: ${{ env.LATEST_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run Trivy scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ env.LATEST_TAG }}
scan-type: image
hide-progress: true
- name: Test running image
run: |
docker run -e ASTEROIDARGS="--date-min=2099-12-25 --date-max=2100-01-01 --dist-max=0.2 --body=Venus" ${{ env.LATEST_TAG }}
docker-alpine:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and export to local images
uses: docker/build-push-action@v5
with:
file: Dockerfile.Alpine
load: true
tags: ${{ env.ALPINE_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run Trivy scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ env.ALPINE_TAG }}
scan-type: image
hide-progress: true
- name: Test running image
run: |
docker run -e ASTEROIDARGS="--date-min=2099-12-25 --date-max=2100-01-01 --dist-max=0.2 --body=Venus" ${{ env.ALPINE_TAG }}