-
Notifications
You must be signed in to change notification settings - Fork 177
43 lines (41 loc) · 1.63 KB
/
master-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Build master
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# QEMU is used to emulated the ARM architecture, allowing us
# to build not-x86 images
- uses: docker/setup-qemu-action@master
with:
platforms: all
# Buildx provides an easier way of building Docker images for other architectures
- uses: docker/setup-buildx-action@master
- name: Build amd64 python3 image
run: |
docker buildx build --platform=linux/amd64 --load -t graphiteapp/graphite-statsd:master .
- name: Run Snyk to check amd64 python3 image for vulnerabilities
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: monitor
image: graphiteapp/graphite-statsd:master
args: --file=Dockerfile --platform=linux/amd64 --project-name=graphite-project/docker-graphite-statsd
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push amd64 python3 image to Docker Hub
run: |
docker buildx build --platform=linux/amd64 --push -t graphiteapp/graphite-statsd:master .
- name: Login to ghcr.io
run: |
echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u deniszh --password-stdin
- name: Build and push amd64 image to ghcr.io
run: |
docker buildx build --platform=linux/amd64 --push -t ghcr.io/deniszh/graphite-statsd:master .