-
Notifications
You must be signed in to change notification settings - Fork 659
Closed
Description
Behaviour
As per the docs, it should automatically checkout the repo before building the docker image. I am building an image with a build context of a subfolder and the working directory is empty.
Steps to reproduce this issue
- Try to build an image with a context other than
.
- Build will fail citing missing directory
Expected behaviour
Repo should be cloned and build should succeed.
Actual behaviour
Repo is not cloned and build fails
Configuration
- Repository URL (if public): https://github.com/ThisIsQasim/Dockerfiles/blob/master/.github/workflows/elasticsearch.yml
- Build URL (if public): https://github.com/ThisIsQasim/Dockerfiles/actions/runs/251159433/workflow
name: Docker Image CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set current directory
run: |
pwd; ls; ls ..
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
env:
VERSION: '7.8.0'
ODFE_VERSION: '1.9.0.2'
REPO: thisisqasim
with:
context: elasticsearch
file: elasticsearch/Dockerfile
build-args: VERSION=${{ env.VERSION }},ODFE_VERSION=${{ env.ODFE_VERSION }}
platforms: linux/amd64,linux/arm64
pull: true
push: true
tags: ${{ env.REPO }}/elasticsearch:${{ env.VERSION }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
Metadata
Metadata
Assignees
Labels
No labels