chore(deps-dev): bump electron from 36.2.0 to 36.4.0 (#5016) #999
This file contains hidden or 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 push Docker image upon release | |
on: | |
push: | |
branches: | |
- 3.x | |
jobs: | |
push_to_registry: | |
name: Build and push Docker image to Docker Hub | |
runs-on: ubuntu-22.04 | |
env: | |
DOCKER_REPO: ${{ secrets.DOCKERHUB_REPOSITORY }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get version from package.json | |
id: get_version | |
run: | | |
VERSION=$(jq -r .version package.json) | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Check if Docker tag exists on Docker Hub | |
id: tag_check | |
run: | | |
STATUS_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ | |
https://hub.docker.com/v2/repositories/${{ env.DOCKER_REPO }}/tags/${{ steps.get_version.outputs.version }}/) | |
echo "status_code=$STATUS_CODE" >> $GITHUB_OUTPUT | |
- name: Build and push Docker image | |
if: steps.tag_check.outputs.status_code != '200' | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: true | |
tags: | | |
${{ env.DOCKER_REPO }}:latest | |
${{ env.DOCKER_REPO }}:${{ env.VERSION }} |