Skip to content

Attempt Docker build and push #7

Attempt Docker build and push

Attempt Docker build and push #7

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Docker Build and Push
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches: [ main ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: name/app
- name: Extract metadata (tags, labels) for Docker
id: meta

Check failure on line 37 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / Docker Build and Push

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 37, Col: 11): The identifier 'meta' may not be used more than once within the same scope.
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: spreedly/phasers-worksample
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: latest