brave-1.62.165 #13
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: Build and Publish Browsertrix Browser Base by Release Tag | |
on: | |
release: | |
types: [published] | |
jobs: | |
build_and_push: | |
name: Build x86 and ARM Images and push to Dockerhub | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- | |
name: Check out the repo | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- | |
name: Set browser version | |
id: set-browser-version | |
run: | | |
IFS='/-'; PARTS=($GITHUB_REF_NAME); unset IFS; | |
echo "BROWSER=${PARTS[0]}" >> $GITHUB_ENV | |
echo "BROWSER_VERSION=${PARTS[1]}" >> $GITHUB_ENV | |
if [[ "${PARTS[0]}" != "chrome" && "${PARTS[0]}" != "brave" ]]; then | |
echo "Exiting, invalid browser in tag '${PARTS[0]}', must be either 'chrome' or 'brave'" | |
exit 1 | |
fi | |
- | |
name: Prepare | |
id: prep | |
run: | | |
DOCKER_IMAGE=webrecorder/browsertrix-browser-base | |
TAGS="${DOCKER_IMAGE}:${{ env.BROWSER }}-${{ env.BROWSER_VERSION }},${DOCKER_IMAGE}:${{ env.BROWSER }}" | |
echo ::set-output name=tags::${TAGS} | |
- | |
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.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- | |
name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
target: ${{ env.BROWSER }} | |
build-args: | | |
BROWSER=${{ env.BROWSER }} | |
BROWSER_VERSION=${{ env.BROWSER_VERSION }} | |
tags: ${{ steps.prep.outputs.tags }} | |
platforms: "linux/amd64,linux/arm64" | |
- | |
name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} | |