Skip to content

1.1.10-5

1.1.10-5 #18

Workflow file for this run

name: Build release
on:
release:
types: [ published ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# 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 test amd64 python3 image
run: |
docker buildx build --platform=linux/amd64 --load -t graphiteapp/graphite-statsd:test .
- name: Run Snyk to check test amd64 python3 image for vulnerabilities
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: monitor
image: graphiteapp/graphite-statsd:test
args: --file=Dockerfile --platform=linux/amd64 --project-name=graphite-project/docker-graphite-statsd
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push amd64 python3 image to Docker Hub
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
docker buildx build --platform=linux/amd64 --push -t graphiteapp/graphite-statsd:${VERSION} .
docker buildx build --platform=linux/amd64 --push -t graphiteapp/graphite-statsd:latest .
- name: Build and push multi-platform images to Docker Hub
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo ${VERSION} | sed -e 's/^v//')
docker buildx build --platform=linux/arm/v7,linux/arm64/v8,linux/s390x,linux/amd64 --push -t graphiteapp/graphite-statsd:${VERSION} .
docker buildx build --platform=linux/arm/v7,linux/arm64/v8,linux/s390x,linux/amd64 --push -t graphiteapp/graphite-statsd:latest .
- name: Login to ghcr.io
run: |
echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u deniszh --password-stdin
- name: Build and push multi-platform images to ghcr.io
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo ${VERSION} | sed -e 's/^v//')
docker buildx build --platform=linux/arm/v7,linux/arm64/v8,linux/s390x,linux/amd64 --push -t ghcr.io/deniszh/graphite-statsd:${VERSION} .
docker buildx build --platform=linux/arm/v7,linux/arm64/v8,linux/s390x,linux/amd64 --push -t ghcr.io/deniszh/graphite-statsd:latest .