snort/.github/workflows/docker.yaml

28 lines
819 B
YAML
Raw Normal View History

2023-02-09 19:05:53 +00:00
name: Docker build
on:
push:
2023-02-09 22:35:16 +00:00
branches: [main]
2023-02-09 19:05:53 +00:00
jobs:
build:
runs-on: self-hosted
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
2023-02-09 19:05:53 +00:00
steps:
- uses: actions/checkout@v2
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
2023-02-16 23:02:11 +00:00
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
2023-02-09 19:05:53 +00:00
- name: Build the Docker image
2023-02-16 23:08:39 +00:00
run: |
docker buildx build \
2023-02-16 23:02:11 +00:00
-t ghcr.io/${{ github.repository_owner }}/snort:latest \
--platform linux/amd64,linux/arm64 \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--cache-to "type=local,dest=/tmp/.buildx-cache" \
--push .