Skip to content

release: v0.2.34

release: v0.2.34 #198

Workflow file for this run

# This workflow uses actions that GitHub does not certify.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.
name: Publish Docker image
on:
release:
types: [published]
push:
branches:
- master
jobs:
push_to_registries:
name: Push Docker image to multiple registries
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5
with:
images: |
getpagespeed/gixy
ghcr.io/${{ github.repository }}
- name: Build and export to Docker (test)
uses: docker/build-push-action@601a80b39c9405e50806ae38af30926f9d957c47 # v6
with:
context: .
load: true
platforms: linux/amd64
tags: gixy:test
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Test --help
run: docker run --rm gixy:test --help
- name: Test analyzing nginx config
run: |
docker run --rm -v ${{ github.workspace }}/tests/integration:/configs:ro \
gixy:test /configs/wordpress_production.conf
- name: Build and push Docker images (multi-arch)
uses: docker/build-push-action@601a80b39c9405e50806ae38af30926f9d957c47 # v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max