Skip to content

modify to actions/checkout@v3 #134

modify to actions/checkout@v3

modify to actions/checkout@v3 #134

Workflow file for this run

name: Build image to DockerHub
on:
push:
branches: [main]
paths:
- "apps/*/Dockerfile"
- "apps/*/cmd.sh"
- "apps/*/entrypoint.sh"
jobs:
test:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 2

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

View workflow run for this annotation

GitHub Actions / .github/workflows/docker.yml

Invalid workflow file

You have an error in your yaml syntax on line 21
- name: Get applist
id: getlist
run: |
git diff --name-only HEAD^ HEAD
changed_files=$(git diff --name-only HEAD^ HEAD)
app_list=$(echo "$changed_files" | grep -E 'apps/.*/(Dockerfile|cmd.sh|entrypoint.sh)$' | awk -F'/' '{print $2}' | sort | uniq)
echo "APP_LISTS=$app_list" >> $GITHUB_ENV
- uses: mr-smithers-excellent/docker-build-push@v5
name: Build & push Docker image
if: env.PASS_STEP=='false'
with:
image: websoft9dev/${{env.W9_NAME}}
tags: ${{env.TAGS}}
registry: docker.io
dockerfile: Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: websoft9dev/${{env.W9_NAME}}
readme-filepath: apps/${{env.W9_NAME}}/myread.md