diff --git a/.github/workflows/buidl_and_push_ghcr.yml b/.github/workflows/buidl_and_push_ghcr.yml index 64907d5..2170477 100644 --- a/.github/workflows/buidl_and_push_ghcr.yml +++ b/.github/workflows/buidl_and_push_ghcr.yml @@ -15,8 +15,22 @@ jobs: runs-on: ubuntu-latest steps: - - name: Debug Docker socket + - name: Checkout code + uses: actions/checkout@v4 + + - name: Extract metadata + id: meta run: | - echo "Looking for Docker socket..." - find /var/run -name "docker.sock" 2>/dev/null || true - ls -la /var/run/user/ 2>/dev/null || true \ No newline at end of file + echo "date=$(date +'%Y%m%d-%H%M%S')" >> $GITHUB_OUTPUT + echo "sha_short=$(echo ${GITHUB_SHA} | cut -c1-7)" >> $GITHUB_OUTPUT + + - name: Build Docker image + run: | + docker build \ + -t myapp:${{ steps.meta.outputs.sha_short }} \ + -t myapp:latest \ + -f Dockerfile \ + . + + - name: List images + run: docker images | grep myapp \ No newline at end of file