Browsertrix Crawler 0.10.3 #64
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Docker image | |
on: | |
release: | |
types: [published] | |
jobs: | |
push_to_registries: | |
name: Build x86 and ARM Images and push to Dockerhub | |
runs-on: ubuntu-22.04 | |
steps: | |
- | |
name: Check out the repo | |
uses: actions/checkout@v3 | |
- | |
name: Prepare | |
id: prep | |
run: | | |
DOCKER_IMAGE=webrecorder/browsertrix-crawler | |
VERSION=edge | |
if [[ $GITHUB_REF == refs/tags/* ]]; then | |
VERSION=${GITHUB_REF#refs/tags/} | |
elif [[ $GITHUB_REF == refs/heads/* ]]; then | |
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g') | |
elif [[ $GITHUB_REF == refs/pull/* ]]; then | |
VERSION=pr-${{ github.event.number }} | |
fi | |
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:latest" | |
echo ::set-output name=tags::${TAGS} | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- | |
name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- | |
name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.prep.outputs.tags }} | |
platforms: "linux/amd64,linux/arm64" | |
- | |
name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} | |