mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-07 15:07:11 -04:00
49 lines
1.6 KiB
YAML
49 lines
1.6 KiB
YAML
name: Docker
|
|
|
|
on:
|
|
release:
|
|
types: [release]
|
|
|
|
# Run tests for all PRs to master.
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# https://docs.docker.com/build/ci/github-actions/multi-platform/
|
|
- uses: actions/checkout@v4
|
|
- uses: docker/setup-qemu-action@v3
|
|
- uses: docker/setup-buildx-action@v3
|
|
- uses: docker/metadata-action@v5
|
|
id: meta
|
|
with:
|
|
images: ghcr.io/${{ github.repository }}
|
|
# this will generate tags in the following format:
|
|
#
|
|
# latest
|
|
# 1
|
|
# 1.2
|
|
# 1.2.3
|
|
tags: |
|
|
type=raw,value=latest
|
|
type=semver,pattern={{major}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
type=semver,pattern={{version}}
|
|
- name: Login to GitHub Container Registry
|
|
if: github.ref_type == 'tag'
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: ${{ github.ref_type == 'tag' }}
|
|
pull: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
platforms: linux/amd64,linux/arm64
|