Skip to content

Update README.md

Update README.md #3

name: Publish Docker image
on:
push:
branches: ["main"]
tags: ["v*.*.*", "*.*.*"]
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
smoke:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Build local image
run: docker build -t aprs-propview:ci .
- name: Start container
run: |
docker run -d --name aprs-propview-ci -p 14501:14501 aprs-propview:ci
for i in $(seq 1 30); do
if curl -fsS http://127.0.0.1:14501/api/health >/tmp/health.json; then
cat /tmp/health.json
exit 0
fi
sleep 2
done
docker logs aprs-propview-ci
exit 1
- name: Stop container
if: always()
run: docker rm -f aprs-propview-ci || true
docker:
needs: smoke
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/rf-yvy/aprs-propview
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=tag
type=match,pattern=^v?(.*)$,group=1
- name: Build and publish
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}