Skip to content

chore(deps-dev): bump @eslint/js from 9.24.0 to 9.28.0 (#5004) #991

chore(deps-dev): bump @eslint/js from 9.24.0 to 9.28.0 (#5004)

chore(deps-dev): bump @eslint/js from 9.24.0 to 9.28.0 (#5004) #991

Workflow file for this run

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_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}
steps:
- name: Fetch full Git history and tags
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get the latest tag
id: get_tag
run: |
TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "TAG=$TAG" >> $GITHUB_ENV
echo "::set-output name=tag::$TAG"
- name: Checkout latest tag
run: git checkout tags/${{ env.TAG }}
- 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
id: tag_check
run: |
TAG_EXISTS=$(curl -s -o /dev/null -w "%{http_code}" \
https://hub.docker.com/v2/repositories/${DOCKER_REPO}/tags/${TAG}/)
echo "exists=$TAG_EXISTS" >> $GITHUB_OUTPUT
- name: Build and push Docker image
if: steps.tag_check.outputs.exists != '200'
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
${{ env.DOCKER_REPO }}:latest
${{ env.DOCKER_REPO }}:${{ env.TAG }}