Skip to content

ci

ci #954

Workflow file for this run

name: ci
on:
push:
schedule:
- cron: "0 0 * * *"
jobs:
main:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- master
- release
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set version for master
if: ${{ matrix.version == 'master' }}
run: echo 'VERSION=master' >> $GITHUB_ENV
- name: Set tag for master
if: ${{ matrix.version == 'master' }}
run: echo "TAG=docker.io/mpepping/cyberchef:latest" >> $GITHUB_ENV
- name: Set version for release
if: ${{ matrix.version == 'release' }}
run: curl -s https://api.github.com/repos/gchq/CyberChef/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/VERSION=\1/' >> $GITHUB_ENV
- name: Set tag for release
if: ${{ matrix.version == 'release' }}
run: echo "TAG=docker.io/mpepping/cyberchef:${VERSION}" >> $GITHUB_ENV
- name: Build and push
timeout-minutes: 720
uses: docker/build-push-action@v4
with:
push: true
platforms: linux/amd64,linux/arm64
build-args: VERSION=${{ env.VERSION }}
tags: ${{ env.TAG }}