Skip to content

optionally push docker image at end of github action #7

optionally push docker image at end of github action

optionally push docker image at end of github action #7

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag anypay/web3-checkout:${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.head_ref }}
- name: Push Docker Image
if: github.event_name == 'push' && github.event_name != 'pull_request'

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

View workflow run for this annotation

GitHub Actions / .github/workflows/docker-image.yml

Invalid workflow file

You have an error in your yaml syntax on line 21
run: |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker push your-docker-username/your-docker-repo:latest