Skip to content

Build and Push Docker Image to Docker Hub #6

Build and Push Docker Image to Docker Hub

Build and Push Docker Image to Docker Hub #6

Workflow file for this run

name: Build and Push Docker Image to Docker Hub
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: login to docker registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build and push docker image to registry
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/github-action-test:${{ GITHUB_REF_NAME }}

Check failure on line 25 in .github/workflows/docker-image.yml

View workflow run for this annotation

GitHub Actions / Build and Push Docker Image to Docker Hub

Invalid workflow file

The workflow is not valid. .github/workflows/docker-image.yml (Line: 25, Col: 15): Unrecognized named-value: 'GITHUB_REF_NAME'. Located at position 1 within expression: GITHUB_REF_NAME